Setup automatic generation of SVN logs with just one attribute, no link element neces...
[htmlpurifier-web.git] / switch2post.js
bloba4a6c27fb13ffba223c1e82507734489fb0d47f2
1 function switch2post(e) {
2     var text = document.getElementById('html').value;
3     if (text.length < 8000) {
4         var form = document.getElementById('filter');
5         var action = form.action;
6         action = action.substr(0, action.indexOf('?'));
7         location.href = action + '?get&html=' + encodeURIComponent(text);
8         return false;
9     }
10     return true;
13 function setup_switch2post() {
14     var form = document.getElementById('filter');
15     form.onsubmit = switch2post;
18 if (window.addEventListener) {
19     window.addEventListener("load", setup_switch2post, false);
20 } else if (window.attachEvent) {
21     window.attachEvent("onload", setup_switch2post);