diff options
Diffstat (limited to 'module/web/main.js')
-rw-r--r-- | module/web/main.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/module/web/main.js b/module/web/main.js deleted file mode 100644 index a286df991..000000000 --- a/module/web/main.js +++ /dev/null @@ -1,42 +0,0 @@ -function getXmlHttpRequestObject() { - if (window.XMLHttpRequest) { - return new XMLHttpRequest(); //Not IE - } else if(window.ActiveXObject) { - return new ActiveXObject("Microsoft.XMLHTTP"); //IE - } else { - alert("Your browser doesn't support the XmlHttpRequest object. Better upgrade to Firefox."); - } -} -var req = getXmlHttpRequestObject(); - -function getDownloads() { - req.onreadystatechange = function() { - if (req.readyState == 4) { - if(req.status==200) { - document.getElementById('downloads').innerHTML = req.responseText; - } else { - alert("Fehler:\nHTTP-Status: "+req.status+"\nHTTP-Statustext: "+req.statusText); - } - }; - } - req.open("GET", '/downloads', true); - req.send(null); -} - -function addUrl(new_url) { - req.onreadystatechange = function() { - if (req.readyState == 4) { - if(req.status==200) { - document.getElementById('add_urls').innerHTML = req.responseText; - } else { - alert("Fehler:\nHTTP-Status: "+req.status+"\nHTTP-Statustext: "+req.statusText); - } - }; - } - url = "/add=" + new_url - req.open("GET", url, true); - req.send(null); -} - -window.setInterval("getDownloads()", 1000); - |