User:Abates/monacobook.js
From MediaWiki
Jump to navigationJump to searchNote: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* KIRED FUNCTIONS - Javascript Includes */
/*
document.write('<' + 'script language="javascript" type="text/javascript" src="');
document.write('http://www.emopanda.com/tmp/jquery.js');
document.write('"></' + 'script' + '>');
document.write('<' + 'script language="javascript" type="text/javascript" src="');
document.write('http://www.emopanda.com/tmp/jquery.tooltip.js');
document.write('"></' + 'script' + '>');
document.write('<' + 'script language="javascript" type="text/javascript" src="');
document.write('http://www.emopanda.com/tmp/kired_wikifunctions.js');
document.write('"></' + 'script' + '>');
*/
var ss_memory = null;
var ss_timeron = 0;
var ss_timer;
function DoActualSearch() {
ss_timeron=0;
var newdiv = document.getElementById("searchsuggest");
if (!newdiv) {
var newdiv = document.createElement("div");
newdiv.id = "searchsuggest";
var searchdiv = document.getElementById("searchBody");
searchdiv.appendChild(newdiv);
}
var x = document.getElementById("searchInput").value;
if (x == ss_memory) {
return;
}
ss_memory = x;
document.getElementById("searchsuggest").style.display = 'none';
if (x.length < 30 && x.length > 1 && x.value != "") {
sajax_do_call("wfAjaxSearchSuggest", [x], newdiv);
document.getElementById("searchsuggest").style.display = 'block';
}
}
fuction MySearchCall() {
if(ss_timeron) {
clearTimeout(ss_timer);
setTimeout("DoActualSearch();",1000);
} else {
setTimeout("DoActualSearch();",1000);
ss_timeron=1;
}
}
function SetUpSearchBox() {
var x = document.getElementById('searchInput');
x.onkeyup = function(){
MySearchCall();
};
}
function myss_ajax_onload(){
setTimeout("SetUpSearchBox();",250);
}
hookEvent("load", myss_ajax_onload);

