User:Krzysiu/monobook.js
(Redirected from User:Herr Kriss/monobook.js)
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:Krzysiu/monobook.css. |
// Zmiana pomaranczowego paska
addOnloadHook(function() {
try {
var content_sub = document.getElementById("contentSub");
var iter = content_sub.nextSibling;
var count = 0;
while ((iter != null) && (count < 3)) {
if ((iter.nodeName.search(/div/i) == 0) && (iter.className.search(/usermessage/i) == 0)) {
try {
var kb_text = new Array(
new Array("You've got ","new spam",", you won't read ","anyway"),
new Array("Some ","fools"," spammed your ","talk"),
new Array("Reverting is ","really"," the nicest action on ","earth"),
new Array("Heeeeeloooo, someone ","wants"," to talk to ","you!"),
new Array("By accident ","someone"," found the way to your ","talk"),
new Array("","Someone"," likes ","you")
);
var index = Math.floor(kb_text.length * Math.random());
var elem = iter.firstChild;
elem.data = kb_text[index][0];
elem = elem.nextSibling;
elem.firstChild.data = kb_text[index][1];
elem = elem.nextSibling;
elem.data = kb_text[index][2];
elem = elem.nextSibling;
elem.firstChild.data = kb_text[index][3];
} catch(e) {alert(e);}
break;
}
iter = iter.nextSibling;
count ++;
}
} catch(e) {}
});
function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) {
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageId": imageId,
"imageFile": imageFile,
"speedTip": speedTip,
"tagOpen": tagOpen,
"tagClose": tagClose,
"sampleText": sampleText};
}
addCustomButton('http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_aviso.png',
'copyvio',
'{'+'{subst:copyvionote|',
'}} ~~'+'~~',
'',
'mw-editbutton-copyvio');
addCustomButton('http://upload.wikimedia.org/wikipedia/commons/9/9d/Button_halt.png',
'endofcopyvios',
'{'+'{subst:end of copyvios}} ~~'+'~~',
'',
'',
'mw-editbutton-eocv');