User:Davidcannon/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:Davidcannon/monobook.css. |
#content,
#p-cactions ul li a { background:#99F3FF }
pre { background: #99F3FF }
// [[User:Lupin/popups.js]]
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
function inc (file) {
var lt = String.fromCharCode(60);
var gt = String.fromCharCode(62);
if (file.indexOf(".js") > -1) {
document.writeln(lt+'script type="text/javascript" src="/w/index.php?title='+file+'&action=raw&ctype=text/javascript&dontcountme=s"'+gt+lt+'/script'+gt);
} else if (file.indexOf(".css") > -1) {
document.writeln(lt+'link rel="stylesheet" type="text/css" href="/w/index.php?title='+file+'&action=raw&ctype=text/css" /'+gt);
}
}
function loadmonobook(user) {
inc("User:"+user+"/monobook.css");
inc("User:"+user+"/monobook.js");
}
inc("User:Topaz/init.js");
inc("User:Topaz/util.js");
inc("User:Topaz/sectionsplitter.js");
inc("User:Topaz/editcountutil.js");
inc("User:Topaz/comm.js");
inc("User:Topaz/wputil.js");
inc("User:Topaz/statuschanger.js");
/*
Doesn't work in IE; window.onclick doesn't fire for right clicks.
*/
topaz.editcountutil = new Object();
/* configuration */
// this should be a cgi script to go to instead when User: or User_talk: links are double-clicked. the username will be appended, so that variable should be last in the query string.
topaz.editcountutil.toolurl = "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=";
/* end configuration */
topaz.editcountutil.oldonclick = document.onclick;
document.onclick = function(e) {
if (typeof topaz.editcountutil.oldonclick == "function") topaz.editcountutil.oldonclick();
var b = e ? topaz.util.mousebtnmap.ns[e.which] : topaz.util.mousebtnmap.ie[event.button];
if (b != 2) return;
var realtarg = e ? e.target : event.srcElement;
var username;
if (realtarg.nodeName.toLowerCase() != "a") realtarg = realtarg.parentNode;
if (realtarg.nodeName.toLowerCase() == "a") {
var a = realtarg.href.split("/wiki/User:");
if (!a[1]) {a = realtarg.href.split("/wiki/User_talk:");}
if (a[1]) {
var b = a[1].split("/");
username = b[0];
}
}
if (username) {
location.href = topaz.editcountutil.toolurl + username;
return false;
}
};