User:Interiot/monobook.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.

If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
 // include a wikilinked JS script
 function jsinc(s) {
 	s = s.replace(/^\[\[/, '').replace(/\]\]$/, '');
 	document.write('<scr'+'ipt type="text/javascript" src="'
 		+ 'http://en.wikipedia.org/w/index.php?title=' + s
 		+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
 }
 // include an external JS script
 function jsextinc(u) {
 	document.write('<scr'+'ipt type="text/javascript" src="' + u.replace(/ *$/, "") + '"></scr'+'ipt>');
 }
 
 //disableRealTitle = 1;   // disable RealTitle
 //onloadFuncts = new Array();   // disable RealTitle
 //jsinc('[[User:Interiot/js/RealTitle.js]]');  // include the development version instead
 
 
 // Interiot's Tool2 (I don't use it...  Tool1 or Tool3 should be used instead, but sometimes people ask for it to be debugged)
 //document.write('<script type="text/javascript" src="' 
 //		+ 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' 
 //		+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 jsextinc('http://68k.org/~interiot/apps/wikipedia/remote/Tool2.js ');
 
 // include offsite files so people don't have to see every little change (eg. transfering from home to work mode):  http://paperlined.org/apps/wikipedia/remote/monobook.css and http://paperlined.org/apps/wikipedia/remote/monobook.js
 document.write('<style type="text/css">/*<![CDATA[*/ @import "http://68k.org/~interiot/apps/wikipedia/remote/monobook.css"; /*]]>*/</style>');
 jsextinc('http://68k.org/~interiot/apps/wikipedia/remote/monobook.js ');
 
 jsinc('[[User:Interiot/js/nothanksweb_gen.js]]');	// auto-generate the nothanks-web template when viewing Special:Undelete of a G12'd article
 //jsextinc('http://68k.org/~interiot/apps/wikipedia/remote/nothanksweb_gen.js ');

 // ---- auto-fill things in ----
 addOnloadHook(function() {
 	if (document.getElementById("deleteconfirm")) {
 		var reason = document.getElementById("wpReason");
 		if (!reason.value)   reason.value = "[[WP:CSD|CSD]]-";		// auto-fill the deletion reason in with CSD
 		reason.focus;
 	}
 });