summaryrefslogtreecommitdiff
path: root/moe/panel/js/livesearch.js
diff options
context:
space:
mode:
authorpantsucat <contact@pantsu.cat>2015-09-19 15:18:13 +0200
committerpantsucat <contact@pantsu.cat>2015-09-19 15:30:28 +0200
commit6d2d9e34001d4569e9a1d486124e94bf2c22fa5f (patch)
treea1fb6e461f99282cca2584ca2819caf46be35ceb /moe/panel/js/livesearch.js
parent6138ca535f6d5e0fe4bc67faa85a82ac500f5dc8 (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.js39
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 = "";
-}