Utente:Falling Down/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica |
MFH (rosica | curriculum) Nessun oggetto della modifica |
||
(10 versioni intermedie di un altro utente non mostrate) | |||
Riga 1: | Riga 1: | ||
disableAlert = true; |
|||
/*function setCookie(c_name,value,expiredays) |
|||
disableHideEdit = true; |
|||
{ |
|||
if (mwCustomEditButtons) { |
|||
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() |
|||
{ |
|||
lastid=getCookie('lastid'); |
|||
if (lastid!=null && lastid!="") |
|||
{ |
|||
return lastid; |
|||
} |
|||
else |
|||
{ |
|||
alert('Cookie not set!') |
|||
} |
|||
} |
|||
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) { |
|||
alert("C'è una nuova modifica! Id modifica: " + xhr.responseXML.getElementsByTagName('rc')[0].attributes['rcid'].value + ". Lastid: " + lastid); |
|||
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") { |
|||
setCookie('lastid', -1, 1); |
|||
setInterval("getlastchange(checkCookie('lastid'));", 10000); |
|||
} |
|||
} |
|||
addOnloadHook(dynuminit);*/ |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
if (mwCustomEditButtons) { |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png", |
||
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)", |
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)", |
||
"tagOpen": "{{Cancellazione|motivo=", |
"tagOpen": "{{Cancellazione|motivo=", |
||
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
||
"sampleText": " |
"sampleText": "No"}; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
} |
|||
if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png", |
||
"speedTip": "Articolo in scadenza", |
"speedTip": "Articolo in scadenza", |
||
"tagOpen": "{{scadenza|scadenza=" + "{{subst:7g}" + "}|note=", |
"tagOpen": "{{scadenza|scadenza=" + "{{subst:7g}" + "}|note=", |
||
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
||
"sampleText": " |
"sampleText": "[[Manuale d'umorismo|Poco umoristico]] e [[Aiuto:Manuale/Formattazione|malformattato]]"}; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
} |
|||
if (mwCustomEditButtons) {mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png", |
||
"speedTip": "Articolo in dubbio", |
"speedTip": "Articolo in dubbio", |
||
Riga 107: | Riga 21: | ||
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
"tagClose": "|firma=~~" + "~~}" + "}\n\n", |
||
"sampleText": "Inserire qui l'accusa"}; |
"sampleText": "Inserire qui l'accusa"}; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
} |
|||
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0a/Button_sad.png", |
|||
if (mwCustomEditButtons) {mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"speedTip": "Poco umoristico", |
|||
"tagOpen": "{{Accusa|accusa=" + "APU" + "|firma=~~" + "~~}" + "}\n\n", |
|||
"tagClose": "", |
|||
"sampleText": ""}; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png", |
|||
"speedTip": "Barrato", |
|||
"tagOpen": "<s>", |
|||
"tagClose": "</s>", |
|||
"sampleText": "Barrato"}; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://images2.wikia.nocookie.net/__cb20100806112827/nonciclopedia/images/f/f7/Button_ko.png", |
|||
"speedTip": "Avvertimento", |
|||
"tagOpen": "{{avvertimento}} <br /> Non creare pagine", |
|||
"tagClose": " a cazzo di cane, grazie. \n\n", |
|||
"sampleText": ""}; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png", |
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png", |
||
"speedTip": "Prenota il tuo NIUBBO!", |
"speedTip": "Prenota il tuo NIUBBO!", |
||
Riga 115: | Riga 46: | ||
"sampleText": "Falling Down"}; |
"sampleText": "Falling Down"}; |
||
} |
} |
||
if (mwCustomEditButtons) {mwCustomEditButtons[mwCustomEditButtons.length] = { |
|||
addOnloadHook(function() { |
|||
"imageFile": "", |
|||
if(!document.getElementById("toolbar")) return; |
|||
"speedTip": "Avvertimento", |
|||
if(wgCurRevisionId) |
|||
"tagOpen": "Non creare pagine", |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}'; |
|||
"tagClose": " a cazzo di cane, grazie.\n\n", |
|||
else |
|||
"sampleText": ""}; |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}'; |
|||
} |
|||
} |
|||
); |
Versione attuale delle 22:38, 26 set 2013
disableAlert = true;
disableHideEdit = true;
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": "No"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png",
"speedTip": "Articolo in scadenza",
"tagOpen": "{{scadenza|scadenza=" + "{{subst:7g}" + "}|note=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "[[Manuale d'umorismo|Poco umoristico]] e [[Aiuto:Manuale/Formattazione|malformattato]]"};
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/0/0a/Button_sad.png",
"speedTip": "Poco umoristico",
"tagOpen": "{{Accusa|accusa=" + "APU" + "|firma=~~" + "~~}" + "}\n\n",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "Barrato",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Barrato"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/__cb20100806112827/nonciclopedia/images/f/f7/Button_ko.png",
"speedTip": "Avvertimento",
"tagOpen": "{{avvertimento}} <br /> Non creare pagine",
"tagClose": " a cazzo di cane, grazie. \n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/b/b3/Pulsante_niubbi.png",
"speedTip": "Prenota il tuo NIUBBO!",
"tagOpen": "{{NST|",
"tagClose": "|{{utente:Falling Down/firma}}}" + "}\n\n",
"sampleText": "Falling Down"};
}
addOnloadHook(function() {
if(!document.getElementById("toolbar")) return;
if(wgCurRevisionId)
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
else
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
}
);