GW-SolaPan@legacy41689516 (talk | contribs) No edit summary |
GW-SolaPan@legacy41689516 (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
var DEBUGMODE = true; |
var DEBUGMODE = true; |
||
− | alert('Once upon two times there were three frogs who ate four trolls that lived above bridges which are toll-free on the five weekdays six years ago'); |
+ | alert('Once upon two times there were three frogs who ate four trolls that lived above bridges which are toll-free on the five weekdays six years ago seven light years away'); |
Line 33: | Line 33: | ||
if (navigator.appName == "Microsoft Internet Explorer"){ |
if (navigator.appName == "Microsoft Internet Explorer"){ |
||
+ | alert('Aye... Eee'); |
||
⚫ | |||
⚫ | |||
document.body.insertBefore(debugDiv, document.body.firstChild); |
document.body.insertBefore(debugDiv, document.body.firstChild); |
||
⚫ | |||
⚫ | |||
} |
} |
||
Revision as of 09:38, 23 April 2007
// <pre>
var TOOLSCRIPTPATH = 'MediaWiki:';
function DocWriteJS(page){
var str = '<script type="text/javascript" src="/index.php?title='
+ TOOLSCRIPTPATH + page
+ '&action=raw&ctype=text/javascript"></script>';
// alert(str);
document.write(str);
}
// </pre> Loads up [[MediaWiki:DebuggerInit.js]] and [[MediaWiki:DebugTools.js]] <pre>
var DEBUGMODE = true;
alert('Once upon two times there were three frogs who ate four trolls that lived above bridges which are toll-free on the five weekdays six years ago seven light years away');
function debuggerInit() {
if (!DEBUGMODE) return;
var debugDiv = document.createElement("div");
debugDiv.id = 'debugDiv';
debugDiv.style.background='yellow';
debugDiv.style.clear='both';
var debugHead = document.createElement("div");
debugHead.id = 'debugHead';
debugHead.innerHTML = 'Debug buffer header';
debugDiv.appendChild(debugHead);
var debugBody = document.createElement("div");
debugBody.id = 'debugBody';
debugDiv.appendChild(debugBody);
if (navigator.appName == "Microsoft Internet Explorer"){
alert('Aye... Eee');
document.body.insertBefore(debugDiv, document.body.firstChild);
} else {
document.body.appendChild(debugDiv);
}
return true;
}
/*
alert('DebuggerInit called in sick');
}
*/
addOnloadHook(debuggerInit);
/*
if (DEBUGMODE) {
//alert('there was a frog-eating headlesschicken');
// DocWriteJS('DebuggerInit.js');
DocWriteJS('DebugTools.js');
}
*/
/* </pre>
* Overwrites the original function in http://gw.gamewikis.org/skins/common/sorttable.js
* with [[MediaWiki:sortable_mod.js]] .
<pre> */
function sortableTables() {
if (getElementsByClassName(document, "table", "sortable").length != 0) {
DocWriteJS('sortable_mod.js');
}
}
// </pre>