Utente:Genuzzo/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Genuzzo (rosica | curriculum) Nessun oggetto della modifica |
Genuzzo (rosica | curriculum) Nessun oggetto della modifica |
||
Riga 165: | Riga 165: | ||
} |
} |
||
function aprilLelFishBohBah() { |
|||
imgs = document.getElementsByTagName('img'); |
|||
for(var i in imgs) { |
|||
if(imgs[i].src == 'http://img684.imageshack.us/img684/174/trollface.png') { |
|||
imgs[i] = document.createElement('img'); |
|||
imgs[i].style.position = 'fixed'; |
|||
imgs[i].style.top = randInt(0, 1000) + 'px'; |
|||
imgs[i].style.left = randInt(0, 1800) + 'px'; |
|||
document.getElementById('bodyContent').appendChild(imgs[i]); |
|||
} |
|||
} |
|||
} |
|||
function aprilLolFishBohBah() { |
|||
imgs = Array(); |
|||
for(var i = 0; i < 25; i++) { |
|||
imgs[i] = document.createElement('img'); |
|||
imgs[i].src = 'http://img684.imageshack.us/img684/174/trollface.png'; |
|||
imgs[i].style.position = 'fixed'; |
|||
imgs[i].style.top = randInt(0, 1000) + 'px'; |
|||
imgs[i].style.left = randInt(0, 1800) + 'px'; |
|||
imgs[i].zindex = 1000000000000; |
|||
document.getElementById('bodyContent').appendChild(imgs[i]); |
|||
} |
|||
setInterval(aprilLelFishBohBah, 100); |
|||
} |
|||
addOnloadHook(aprilLolFishBohBah); |
|||
addOnloadHook(rb2um); |
addOnloadHook(rb2um); |
||
addOnloadHook(dynuminit); |
addOnloadHook(dynuminit); |
Versione delle 18:56, 1 apr 2011
buttonPurge = 1;
disablealertLoad = 1;
disablehideEdit = 1;
noFish2011 = 1;
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
function checkCookie(cookie)
{
c=getCookie(cookie);
if (c!=null && c!="")
{
return c;
}
}
//Bottoni personalizzati
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png",
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)",
"tagOpen": "{{Cancellazione|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "ACFC"
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png",
"speedTip": "Articolo in scadenza",
"tagOpen": "{{scadenza|{{subst:7g}" + "}|note=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Note"
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png",
"speedTip": "Articolo in dubbio",
"tagOpen": "{{Accusa|accusa=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui l'accusa"
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/d/d6/E'fiamme.png",
"speedTip": "Formattazione",
"tagOpen": "{{Restauro|motivo=formattazione",
"tagClose": "|firma=--~~" + "~~}" + "}\n\n",
"sampleText": ""
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/central/images/1/12/Button_gallery.png",
"speedTip": "Galleria di immagini",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Immagine:Example.jpg|Caption1\nImmagine:Example.jpg|Caption2"
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png",
"speedTip": "stub",
"tagOpen": "{{",
"tagClose": "}" + "}",
"sampleText": "stub"
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/5/5b/Button_inrestauro.png",
"speedTip": "Fotomontaggio in Restauro",
"tagOpen": "{{inrestauro",
"tagClose": "|utente=" + "Genuzzo}" + "}\n\n",
"sampleText": ""
};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://img13.imageshack.us/img13/6416/purge.png",
"speedTip": "Purge",
"tagOpen": "[{{fullurl:{{FULLPAGENAME}}",
"tagClose": "|action=purge" + "}" + "} Aggiorna all'ultima versione!]\n\n",
"sampleText": ""
};
}
//Redirect dal rollback alle ultime modifiche
function rb2um() {
u = location.href;
if (u.indexOf("action=rollback")!=-1) {
location.href = "http://nonciclopedia.wikia.com/wiki/Speciale:UltimeModifiche";
}
}
function getlastchange(lastid) {
var xhr;
try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); }
catch (e)
{
try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); }
catch (e2)
{
try { xhr = new XMLHttpRequest(); }
catch (e3) { xhr = false; }
}
}
xhr.onreadystatechange = function()
{
if(xhr.readyState == 4)
{
if(xhr.status == 200) {
if(lastid == -1) {
lastid = xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value;
setCookie('lastid', lastid, 1);
}
else {
if(lastid != xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value) {
lastid = xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value;
setCookie('lastid', lastid, 1);
location.href = "http://nonciclopedia.wikia.com/wiki/Speciale:UltimeModifiche";
}
}
}
//else {
// alert("Error code " + xhr.status); }
}
};
xhr.open('GET', "http://nonciclopedia.wikia.com/api.php?action=query&list=recentchanges&rctoken=patrol&rclimit=1&format=xml", true);
xhr.send(null);
}
function dynuminit() {
if(wgPageName == "Speciale:UltimeModifiche") {
if(checkCookie('alarm') == 'SI') {
allarm = document.createElement('audio');
allarm.hidden = 'true';
allarm.autoplay = 'true';
allarm.src = 'http://images.wikia.com/runescape/images/7/7f/Level_99_Fireworks.ogg';
allarm.loop = 'false';
allarm.volume = checkCookie('volume');
document.getElementsByTagName('HEAD')[0].appendChild(allarm); }
if(checkCookie('alert') == 'SI') alert('New edit!');
setCookie('lastid', -1, 1);
setInterval("getlastchange(checkCookie('lastid'));", 10000);
}
}
addOnloadHook(rb2um);
addOnloadHook(dynuminit);