diff options
| author | pantsucat <contact@pantsu.cat> | 2015-09-19 15:18:13 +0200 |
|---|---|---|
| committer | WubTheCaptain <wub@partyvan.eu> | 2015-09-19 16:18:26 +0200 |
| commit | baec4f769c70c463cf338463cc295cb1f855390b (patch) | |
| tree | 71bb3b880e6b3b85747bc5270a537ecf9acce3c3 /moe/panel/js/livesearch.js | |
| parent | 725fe56786edcb627d1f03a6a4045d3980eacc10 (diff) | |
Remove moe panel from core
The moe panel is more of an extension of the core, but not necessary for
Pomf's functionality. The code also suffers from bad practices and it's
more of a prototype. The panel is also mostly unmaintained by its
author.
This code will be in a seperate Git repository called pomf-moe from now
on.
Diffstat (limited to 'moe/panel/js/livesearch.js')
| -rw-r--r-- | moe/panel/js/livesearch.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/moe/panel/js/livesearch.js b/moe/panel/js/livesearch.js deleted file mode 100644 index 4a59797..0000000 --- a/moe/panel/js/livesearch.js +++ /dev/null @@ -1,39 +0,0 @@ -function createRequestObject(){ -var request_o; -var browser = navigator.appName; -if(browser == "Microsoft Internet Explorer"){ -request_o = new ActiveXObject("Microsoft.XMLHTTP"); -}else{ -request_o = new XMLHttpRequest(); -} -return request_o; -} - -var http = createRequestObject(); - -function liveSearch() -{ -var url = "../includes/api.php?do=search"; -var s = document.getElementById('qsearch').value; -var params = "&s="+s; -http.open("POST", url, true); - -http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); -http.setRequestHeader("Content-length", params.length); -http.setRequestHeader("Connection", "close"); - -http.onreadystatechange = function() { -if(http.readyState == 4 && http.status != 200) { -document.getElementById('searchResults').innerHTML='<li>Loading...</li>'; -} -if(http.readyState == 4 && http.status == 200) { -document.getElementById('searchResults').innerHTML = http.responseText; -} -} -http.send(params); -} - -function sendToSearch(str){ -document.getElementById('qsearch').value = str; -document.getElementById('searchResults').innerHTML = ""; -} |
