Utente:Nonciclopediologo/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 605: | Riga 605: | ||
setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, |
setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, |
||
controlHTML: '<img src="http://img31.imageshack.us/img31/7153/arrowv.png" style="width:20px; height:20px;" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol" |
controlHTML: '<img src="http://img31.imageshack.us/img31/7153/arrowv.png" style="width:20px; height:20px;" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol" |
||
controlattrs: {offsetx: |
controlattrs: {offsetx:1330, offsety:28}, //offset of control relative to right/ bottom of window corner |
||
anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links |
anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links |
||
Versione delle 19:44, 7 mar 2012
disablealertLoad=1;
disablehideEdit=1;
buttonPurge = 1;
var noNavSlide = false;
var noMorphSFX = false;
/* mona = true; */
/* Edit current version */
addOnloadHook(editcurrentid);
import_script(1,'Nonciclopedia:Script/Votazione.js');
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": "Inserire qui il motivo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/3/34/Button_MrX.png",
"speedTip": "Battute tra amici",
"tagOpen": "{{Cancellazione|motivo=BTA|firma=--~~" + "~~}" + "}\n\n",
"tagClose": "",
"sampleText": ""};
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://upload.wikimedia.org/wikipedia/commons/b/bd/Button_recherche_ip.png",
"speedTip": "Accusa",
"tagOpen": "{{Accusa|accusa=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui il motivo"};
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/commons/f/f0/Bouton_Vandale0.png",
"speedTip": "Vandalo",
"tagOpen": "{{Vandalo",
"tagClose": "}}<br>~~"+"~~{{VF|}}",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images3.wikia.nocookie.net/nonciclopedia/images/5/5c/Logo_Avvisi.png",
"speedTip": "Avvertimento",
"tagOpen": "{{",
"tagClose": "}}<br>--~~"+"~~{{VF|}}",
"sampleText": "Avvertimento"};
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://images1.wikia.nocookie.net/__cb20071214202706/nonciclopedia/images/e/e1/E%27mat.png",
"speedTip": "Restauro generico",
"tagOpen": "{{Restauro|motivo=",
"tagClose": "|firma=--~~" + "~~}" + "}\n\n",
"sampleText": "Inserire il motivo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images1.wikia.nocookie.net/nonciclopedia/images/4/48/Button_McGyver.png",
"speedTip": "No immagini",
"tagOpen": "{{restauro|motivo=noimmagini",
"tagClose": "|firma=--~~" + "~~}" + "}\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images3.wikia.nocookie.net/nonciclopedia/images/3/3c/Button_Casadiroccata.png",
"speedTip": "Utilizzato",
"tagOpen": "{{Utilizzato|",
"tagClose": "}" + "}",
"sampleText": "Inserisci qui la pagina"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/3/33/Sguardone.png",
"speedTip": "Immagine da rinominare ",
"tagOpen": "{{Nomedimmerda|{{subst:7g}" + "}|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/f/f9/Button_box.png",
"speedTip": "Box",
"tagOpen": '{| width="100%" align="center" style="background: #FFFFFF; color: #000000; border: 1px solid #000000; text-align: left; margin-bottom: 0px; margin-top: 0px;"\n| style="padding-right: 4px; padding-left: 4px;" |\n',
"tagClose": "\n|}\n",
"sampleText": "Inserire qui il testo interno"};
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://images3.wikia.nocookie.net/nonciclopedia/images/6/6c/Button_restauro.png",
"speedTip": "Restaurant",
"tagOpen": "{{",
"tagClose": "}" + "}",
"sampleText": "Utente:Nonciclopediologo/Restauro"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/5/5b/Button_inrestauro.png",
"speedTip": "Fotomontaggio in Restauro",
"tagOpen": "{{inrestauro",
"tagClose": "|utente=" + "Nonciclopediologo}" + "}\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/0/04/Button_Creative_Commons.png",
"speedTip": "Creative Commons",
"tagOpen": "{{Creative Commons|by=y|nc=y|sa=y|versione=3.0|Attribuzione={{Utente:Nonciclopediologo/firma}}",
"tagClose": "}" + "}\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": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/7d/Mifirma.jpg",
"speedTip": "Firma Gay Pride",
"tagOpen": "--{{Utente:Nonciclopediologo/firma2",
"tagClose": "" + "}" + "} ~~" + "~~" + "~\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/2/21/OcchioPNG_pirata.png",
"speedTip": "Firma Pirata",
"tagOpen": "--{{Utente:Nonciclopediologo/firma3",
"tagClose": "" + "}" + "} ~~" + "~~" + "~\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/thumb/5/5d/Papocchio_Socchiuso.png/24px-Papocchio_Socchiuso.png",
"speedTip": "Firma 10000",
"tagOpen": "--{{Utente:Nonciclopediologo/firma6",
"tagClose": "" + "}" + "} ~~" + "~~" + "~\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/nonciclopedia/images/thumb/6/62/Roccia.png/35px-Roccia.png",
"speedTip": "Firma Nonciclopecoso",
"tagOpen": " --{{Utente:I Fantamici 4/firma/Nonciclopecoso",
"tagClose": "" + "}" + "} ~~" + "~~" + "~\n\n",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "Barrato",
"tagOpen": "{{S|",
"tagClose": "}}",
"sampleText": "Barrato"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/f/fd/Button_underline.png",
"speedTip": "Sottolineato",
"tagOpen": "{{U|",
"tagClose": "}}",
"sampleText": "Sottolineato"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png",
"speedTip": "Apice",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Apice"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png",
"speedTip": "Pedice",
"tagOpen": "<sub>",
"tagClose": "</sub>",
"sampleText": "Pedice"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/58/Button_small.png",
"speedTip": "Piccolo",
"tagOpen": "{{Dimensione|80%|",
"tagClose": "}}",
"sampleText": "Piccolo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/56/Button_big.png",
"speedTip": "Grande",
"tagOpen": "{{Dimensione|125%|",
"tagClose": "}}",
"sampleText": "Grande"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/__cb20100806112820/nonciclopedia/images/e/ea/Button_align_left.png",
"speedTip": "Align left",
"tagOpen": '{{Allinea|left|',
"tagClose": "}}",
"sampleText": "Testo allineato a sinistra"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112819/nonciclopedia/images/f/f7/Button_align_center.png",
"speedTip": "Align center",
"tagOpen": "{{Allinea|center|",
"tagClose": "}}",
"sampleText": "Testo centrato"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112825/nonciclopedia/images/a/a5/Button_align_right.png",
"speedTip": "Align right",
"tagOpen": '{{Allinea|right|',
"tagClose": "}}",
"sampleText": "Testo allineato a destra"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images3.wikia.nocookie.net/__cb20100806112827/nonciclopedia/images/1/15/Button_colonne.png",
"speedTip": "Testo in colonne",
"tagOpen": "{{Colonne|col=2|",
"tagClose": "}}\n",
"sampleText": "Inserire qui il testo per le colonne"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://img829.imageshack.us/img829/5043/buttonnoninclude.png",
"speedTip": "<noinclude>",
"tagOpen": "<noinclude>",
"tagClose": "</noinclude>",
"sampleText": "Non includere"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://img9.imageshack.us/img9/7229/buttonincludeonly.png",
"speedTip": "<includeonly>",
"tagOpen": "<includeonly>",
"tagClose": "</includeonly>",
"sampleText": "Includi solo qui"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/6/6f/Button_cit2.png",
"speedTip": "Citazione 2",
"tagOpen": "{{Cit2|",
"tagClose": "}}\n",
"sampleText": "Inserire qui la citazione"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images1.wikia.nocookie.net/nonciclopedia/images/f/f6/Button_Citnec.png",
"speedTip": "Citazione necessaria",
"tagOpen": "{{Citnec|",
"tagClose": "}}",
"sampleText": "Inserire qui la citazione"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/4/4a/Bottone_curiosità.png",
"speedTip": "Curiosità",
"tagOpen": "{" + "{Curiosità}}",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Tabella",
"tagOpen": '{| class="wikitable"\n|-\n',
"tagClose": "\n|}",
"sampleText": "! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/2/20/Button_censura2.png",
"speedTip": "Censura",
"tagOpen": "{{Censura|",
"tagClose": "}}",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e8/Pulsante_unverified.png",
"speedTip": "Colore",
"tagOpen": "{{Colore|#Codice esadecimale|",
"tagClose": "}}",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/aa/Button_question.png",
"speedTip": "Carattere",
"tagOpen": "{{Carattere|Tipo di carattere|dim%|",
"tagClose": "}}",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/56/Button_big.png",
"speedTip": "Dimensione",
"tagOpen": "{{Dimensione|dim%|",
"tagClose": "}}",
"sampleText": "Testo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": "Nome pagina"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112828/nonciclopedia/images/7/75/Button_ok.png",
"speedTip": "OK",
"tagOpen": "{" + "{OK}}",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images2.wikia.nocookie.net/__cb20100806112827/nonciclopedia/images/f/f7/Button_ko.png",
"speedTip": "KO",
"tagOpen": "{" + "{KO}}",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/74/Button_comment.png",
"speedTip": "Commento",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Inserisci qui il testo"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images4.wikia.nocookie.net/__cb20100806112826/nonciclopedia/images/2/23/Button_code.png",
"speedTip": "Inserisci il codice",
"tagOpen": "<code>",
"tagClose": "</code>",
"sampleText": "Inserisci qui il codice"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "Inserisci la nota nel testo",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Inserisci qui il testo della nota"};
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteCassetto;
}
/* Verifica firma */
addOnloadHook(function() {
if(!document.getElementById("toolbar")) return;
if(wgCurRevisionId)
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
else
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
}
);
/* Live preview */
/*addOnloadHook(function() { import_script((wgAction == 'edit'|| wgAction == 'submit'), "Nonciclopedia:Script/Anteprima.js");})*/
/* FakeMSN */
addOnloadHook (function () {
if (wgAction != 'view' || wgPageName != "Utente:Zazjlops/sandbox") return false;
var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
httpRequest.onreadystatechange = function () { FakeMSN(httpRequest); };
httpRequest.open('GET', "http://nonciclopedia.wikia.com/api.php?action=parse&page=Utente:Zazjlops/FakeMSN&prop=text&format=xml", true);
httpRequest.send('');
return;
});
function FakeMSN(o) {
if (o.readyState != 4) return;
if (o.status < 199 || o.status > 300) return false;
var box = document.createElement('div');
box.id = "FakeMSN";
box.innerHTML = o.responseXML.getElementsByTagName('text').item(0).firstChild.data;
box.style.position = 'fixed';
box.style.right = "0px";
document.getElementById("bodyContent").appendChild(box);
const dT = 7; /* ritardo tra due scatti */
const Scatti = 10; /* numero di scatti */
const Intervallo = 10000; /* tempo tra un popup e l'altro */
const Durata = 6000; /* tempo di apertura di un popup */
box.style.display = 'block';
height = box.scrollHeight;
box.style.bottom = '-' + height + 'px';
function slide_up() {
Slide(box, 2, height, Scatti, dT, 0 - height, false);
return;
}
function slide_down() {
Slide(box, 2, height, Scatti, dT, 0, true);
return;
}
slide_up();
setTimeout(slide_down, Durata);
setInterval(slide_up, Intervallo);
setTimeout(function() {setInterval(slide_down, Intervallo); return;}, Durata);
return;
}
/* ------------------------------------------ Link in basso ------------------------------------------ */
/* Link al DPL Restauro */
function createDPLlink() {
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'pt-DPLlink');
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Nonciclopedia:Progetto_Restauro/DPLMonitor/CFTemplate" title="Controlla il lavoro ancora da fare! [alt-shift-1]" accesskey="1">DPL</a> - ';
menuList.appendChild(newLi);
}
addOnloadHook(createDPLlink);
/* Link alle Richieste Grafiche */
function createGraflink() {
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'pt-Graflink');
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Nonciclopedia:Progetto_GraFica/Richieste" title="Controlla le richieste grafiche! [alt-shift-2]" accesskey="1">Richieste</a> - ';
menuList.appendChild(newLi);
}
addOnloadHook(createGraflink);
/* Link al numero di EDIT */
function createEDITlink() {
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'pt-EDITlink');
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Speciale:Editcount/Nonciclopediologo" title="Numero di cazzate inserite su Nonciclopedia! [alt-shift-3]" accesskey="1">EDIT</a>';
menuList.appendChild(newLi);
}
addOnloadHook(createEDITlink);
/* Modifiche correlate al DPL Restauro ------------------- NON ATTIVO -------------------------------- */
/*function createRestlink() {
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'pt-Restlink');
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/index.php?title=Speciale:ModificheCorrelate&target=Utente:Nonciclopediologo/DPLModRest&hideminor=0&hidebots=1&limit=1000" title="Modifiche correlate al DPL restauro [alt-shift-4]" accesskey="1">Mod Rest</a>';
menuList.appendChild(newLi);
}
addOnloadHook(createRestlink); */
/* Ultime immagini caricate ------------------- NON ATTIVO -------------------------------- */
/*function createImglink() {
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'pt-Imglink');
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Speciale:ImmaginiRecenti" title="Ultime immagini caricate [alt-shift-5]" accesskey="1">Nuovi file</a>';
menuList.appendChild(newLi);
}
addOnloadHook(createImglink); */
/* ------------------------------------------ Link in basso ------------------------------------------ */
/*Funzione addLoadEvent ----------------------- Prelevati da Wikipedia -------------------- */
function addLoadEvent( f) { addOnloadHook( f); return; }
/* Tab Ultima modifica *** Prelevato da Wikipedia*/
function lastEdit(){
if(!$('ca-history'))
return;
var newLink = wgServer + wgScript + '?title=' + wgPageName + '&diff=0';
addPortletLink('p-cactions', newLink, 'ultima modifica', 'ca-ledit', 'Ultima modifica', 'u');
}
addLoadEvent(lastEdit);
/* Modifica della sezione 0 *** Prelevato da Wikipedia ------------------- NON ATTIVO -------------------------------- */
/*
function addEditSection0(){
if(!$('ca-history'))
return;
var newLink = wgServer + wgScript + '?title=' + wgPageName + '&action=edit§ion=0';
addPortletLink('p-cactions', newLink, 'Sez. 0', 'ca-edit-0', 'Modifica la sezione 0');
}
addLoadEvent(addEditSection0); */
/* Cassetto caratteri modifica aperto */
addOnloadHook(function () {
if (wgAction != 'edit') return;
collapseTable(0);
return;
});
/* Funzione per la barra di modifica */
/*
function FastOpen() {
var Box = document.getElementById("searchBody");
if (!Box) return;
var form = document.createElement("form");
Box.appendChild(form);
form.action = "/index.php";
form.target = "_blank";
var c = document.createElement("input");
form.appendChild(c);
c.type = "text";
c.setAttribute('name', "title");
c.size = "18";
var menu = document.createElement("select");
form.appendChild(menu);
menu.setAttribute('name', "action");
menu.options[menu.length] = new Option("Modifica", "edit", true);
menu.options[menu.length] = new Option("Crono", "history");
var p = document.createElement("input");
p.type = "submit";
p.value = "Vai";
form.appendChild(p);
return;
}
addOnloadHook(FastOpen);
*/
/* Modifica nell'intestazione - Implementato da Sanji*/
/* function modificaIntro() {
if (wgAction != "edit" && wgAction != "submit" && wgNamespaceNumber != -1 && wgRestrictionEdit[0] != "sysop") {
var bodyContent = document.getElementById('bodyContent').innerHTML;
document.getElementById('bodyContent').innerHTML='<span class="editsection">[<a rel="nofollow" title="Modifica la sezione introduttiva" href="http://nonciclopedia.wikia.com/index.php?title=' + wgPageName +'&action=edit&section=0&editintro=MediaWiki:Editintro">modifica</a>]</span>' + bodyContent;
}
}
addOnloadHook(modificaIntro);
*/
/* Aggiunta searchbox mia versione*/
/* document.write('<script type="text/javascript" src="'
+ 'http://nonciclopedia.wikia.com/index.php?title=Utente:Nonciclopediologo/Searchbox.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); */
/* Searchbox approvato */
import_script((wgAction=='edit' || wgAction == 'submit'), "Nonciclopedia:Script/Searchbox.js");
/* Aggiunta advancededit */
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
/* Aggiunta Lupin --- Rompe le scatole*/
/*
document.write('<script type="text/javascript" src="'
+ 'http://nonciclopedia.wikia.com/index.php?title=nonciclopedia:Monobook.js/strings-it.js'
+ '&action=raw&ctype=text/javascript"></script>');
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
*/
/* Modifiche alla pagina --- Controllare il funzionamento */
/* document.write('<script type="text/javascript" src="'
+ 'http://nonciclopedia.wikia.com/index.php?title=Utente:Nonciclopediologo/Modifiche.js'
+ '&action=raw&ctype=text/javascript"></script>'); */
/* NS Search */
/*
document.write('<script type="text/javascript" src="'
+ 'http://nonciclopedia.wikia.com/index.php?title=Utente:Nonciclopediologo/NamespaceSearch.js'
+ '&action=raw&ctype=text/javascript"></script>'); */
/* Random logo *//*
function RandomLogo() {
var logoArray = new Array();
logoArray[0] = 'http://images3.wikia.nocookie.net/nonciclopedia/images/c/c4/Logo_Halloween_2009_Nonciclopediologo.png';
logoArray[1] = 'http://images4.wikia.nocookie.net/nonciclopedia/images/e/e0/Nonci_halloween_icona_Hans_magnus.png';
logoArray[2] = 'http://images4.wikia.nocookie.net/nonciclopedia/images/9/91/Logo_Halloween_2009_Sgrat.png';
var chosenLogo = Math.round(Math.random() * (logoArray.length - 1));
document.getElementById('p-logo').innerHTML = '<a accesskey="z" title="Pagina principale [alt-shift-z]" href="/wiki/Pagina_principale" style="background-image: url(' + logoArray[chosenLogo] + ');"/>';
}
addOnloadHook(RandomLogo);*/
/* To Top */
function ToTop(){
var scrolltotop={
//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},
controlHTML: '<img src="http://img31.imageshack.us/img31/7153/arrowv.png" style="width:20px; height:20px;" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"
controlattrs: {offsetx:1330, offsety:28}, //offset of control relative to right/ bottom of window corner
anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links
state: {isvisible:false, shouldvisible:false},
scrollup:function(){
if (!this.cssfixedsupport) //if control is positioned using JavaScript
this.$control.css({opacity:0}) //hide control immediately after clicking it
var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
dest=jQuery('#'+dest).offset().top
else
dest=0
this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
},
keepfixed:function(){
var $window=jQuery(window)
var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
this.$control.css({left:controlx+'px', top:controly+'px'})
},
togglecontrol:function(){
var scrolltop=jQuery(window).scrollTop()
if (!this.cssfixedsupport)
this.keepfixed()
this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
if (this.state.shouldvisible && !this.state.isvisible){
this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
this.state.isvisible=true
}
else if (this.state.shouldvisible==false && this.state.isvisible){
this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])
this.state.isvisible=false
}
},
init:function(){
jQuery(document).ready(function($){
var mainobj=scrolltotop
var iebrws=document.all
mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
.attr({title:'Torna a inizio pagina'})
.click(function(){mainobj.scrollup(); return false})
.appendTo('body')
if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
mainobj.togglecontrol()
$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
mainobj.scrollup()
return false
})
$(window).bind('scroll resize', function(e){
mainobj.togglecontrol()
})
})
}
}
scrolltotop.init()
}
addOnloadHook(ToTop);
/* WHOIS */
/*function whoisip() {
if(!document.getElementById) return;
var searchForm = document.getElementById("searchform");
var whoisForm=document.createElement('form');
whoisForm.action = 'http://www.dnsstuff.com/tools/whois.ch';
whoisForm.method - 'GET';
whoisForm.innerHTML = '<input accesskey="1" TYPE=text NAME=ip SIZE=16 class="std"><input TYPE=submit VALUE="WHOIS" class="send-btn">';
searchForm.appendChild(whoisForm);
};
addOnloadHook(whoisip);*/
// ================================================================================
// START Automated deletion button script system
// ================================================================================
// Adds customizable one-click deletion buttons to any deletable page.
if(wgNamespaceNumber != -1) addOnloadHook(addDeleteButtons)
function addDeleteButtons() {
if(!document.getElementById('ca-delete')) return
var url=document.getElementById('ca-delete').firstChild.href
if(document.getElementById('content').innerHTML.indexOf('submitdelete')!=-1) {
/* alert('Attenzione: È stato trovato un link &submitdelete. Attento a dove clicchi!'); */
}
if(wgNamespaceNumber == 6) addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('Immagine inutilizzata') ,'elimina veloce','ca-delete1');
}
addOnloadHook(checkdelete);
function checkdelete() {
if(queryString('submitdelete')=='true') {
var btn = (document.getElementById('mw-filedelete-submit')) ? document.getElementById('mw-filedelete-submit') : document.getElementById('wpConfirmB')
btn.click();
}
}
function queryString(p) {
var re = RegExp('[&?]' + p + '=([^&]*)');
var matches;
if (matches = re.exec(document.location)) {
try {
return decodeURI(matches[1]);
} catch (e) {
}
}
return null;
}
// ================================================================================
// END Automated deletion button script system
// ================================================================================
// ==UserScript==
// @name nonciclopedia
// @namespace Genuzzo
// @include http://nonciclopedia.wikia.com/*
// ==/UserScript==
function clockInit() {
my_div = document.getElementById("searchform");
my_div.innerHTML = '<div id="orologio" style="color:darkblue; font-weight:bold; position:relative; right:3px; top:2px;"></div>' + my_div.innerHTML;
window.orologio=document.getElementById('orologio');
setInterval(benv, 1000);
}
function benv() {
var now = new Date();
h=now.getHours();
m=now.getMinutes();
s=now.getSeconds();
if(s<=9) s="0"+s;
if(m<=9) m="0"+m;
if(h<=9) h="0"+h;
time=h+":"+m+":"+s;
orologio.innerHTML = time;
}
addOnloadHook(clockInit);
/* Funzione add or remove to Sidebar */
function ModifySidebar(action, section, name, link) {
try {
switch (section) {
case "languages":
var target = "p-lang";
break;
case "toolbox":
var target = "p-tb";
break;
case "navigation":
var target = "p-navigation";
break;
default:
var target = "p-" + section;
break;
}
if (action == "add") {
var node = document.getElementById(target)
.getElementsByTagName('div')[0]
.getElementsByTagName('ul')[0];
var aNode = document.createElement('a');
var liNode = document.createElement('li');
aNode.appendChild(document.createTextNode(name));
aNode.setAttribute('href', link);
liNode.appendChild(aNode);
liNode.className='plainlinks';
node.appendChild(liNode);
}
if (action == "remove") {
var list = document.getElementById(target)
.getElementsByTagName('div')[0]
.getElementsByTagName('ul')[0];
var listelements = list.getElementsByTagName('li');
for (var i = 0; i < listelements.length; i++) {
if (listelements[i].getElementsByTagName('a')[0].innerHTML == name ||
listelements[i].getElementsByTagName('a')[0].href == link) {
list.removeChild(listelements[i]);
}
}
}
} catch(e) {
// lets just ignore what's happened
return;
}
}
function CustomizeModificationsOfSidebar() {
//adds [[Speciale:Blocca]] from toolbox
ModifySidebar("add", "toolbox", "Pannello di controllo", "http://nonciclopedia.wikia.com/index.php?title=Speciale:AdminDashboard&tab=advanced");
//adds from toolbox
ModifySidebar("add", "navigation", "Monobook CSS", "http://nonciclopedia.wikia.com/wiki/Utente:Nonciclopediologo/monobook.css");
//adds from toolbox
ModifySidebar("add", "navigation", "Monobook JS", "http://nonciclopedia.wikia.com/wiki/Utente:Nonciclopediologo/monobook.js");
//adds from toolbox
ModifySidebar("add", "navigation", "Wikipedia IT", "http://it.wikipedia.org/wiki/" + wgPageName);
ModifySidebar("add", "navigation", "Wikipedia EN", "http://en.wikipedia.org/wiki/" + wgPageName);
ModifySidebar("add", "navigation", "Esporta in PDF", "http://www.web2pdfconvert.com/convert.aspx");
//removes [[Special:Upload]] from toolbox
//ModifySidebar("remove", "toolbox", "Upload file", "http://en.wikipedia.org/wiki/Special:Upload");
}
addOnloadHook(CustomizeModificationsOfSidebar);
/* Funzione per ritornare alle UM dopo un rollback */
/*
function rb2um() {
u = location.href;
if (u.indexOf("action=rollback")!=-1) {
location.href = "http://nonciclopedia.wikia.com/wiki/Speciale:UltimeModifiche";
}
}
addOnloadHook(rb2um); */
/* Segnala ad un Admin - Genuzzo */
/* function segnalaAdmin() {
var msg = prompt("Segnala ad un admin una cosa urgente, come un vandalo da bannare o nonciclopedia mezza distrutta da wikia. IMPORTANTE! NON USARLO PER FUTILITÀ, PEZZO DI MERDA.", "Banna tizio");
var pwd = prompt("Inserire la password.");
pic = new Image(1, 1);
pic.src = "http://genuzzu.altervista.org/ticket/segnala.php?msg=" + msg + "&pwd=" + pwd;
document.getElementById('bodyContent').addChild(pic);
}
function addSegnala() {
var ptsegnala = document.createElement('li');
ptsegnala.id = 'pt-segnala';
ptsegnala.innerHTML = '<a href="javascript:segnalaAdmin();">segnala</a>';
a = document.getElementById('p-personal').getElementsByTagName('ul')[0];
a.insertBefore(ptsegnala, a.firstChild);
}
addOnloadHook(addSegnala);
*/
/* LiveRC */
if(wgPageName == 'Utente:Genuzzo/LiveRC')document.write('<script src="/index.php?title=Utente:Genuzzo/LiveRC.js&action=raw&ctype=text/javascript" type="text/javascript"></script>');
/* Add label User pages */
addOnloadHook(function() {
if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history
return;
if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
var username = encodeURIComponent( wgTitle );
addPortletLink("p-cactions", wgServer + "/wiki/Special:Contributions/" + username, "Contri", "ca-contrib", "Contributi utente");
addPortletLink("p-cactions", wgServer + "/wiki/Special:Editcount/" + username, "Edit", "ca-editcount", "Numero di contributi divisi per Namespace");
addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=move&user=" + username, "Moves", "ca-pagemoves", "Pagine spostate dall'utente");
addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=block&page=User:" + username, "Ban", "ca-blog", "Ban ricevuti dall'utente");
addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Prefixindex&from=" + username + "&namespace=2", "SP", "", "Lista delle pagine in questo Userspace");
/* addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=block&user=" + username, "Blocks given", "", "Blocks by this user");
addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=protect&user=" + username, "Protections", "", "Protections by this user");
addPortletLink("p-cactions", wgServer + "/index.php?title=Special:Log&type=delete&user=" + username, "Deletions", "", "Deletions by this user"); */
}
});
/* function progressNeve() {
$('.papocchioneve').each(function() {
t = $(this);
if(t.css("top").replace('px', '') < w.height() - 25) {
t.css("top", parseInt(t.css("top").replace('px', '')) + 5 + 'px');
}
else t.css("top", w.height() - 25);
})
for(i = -1; i < w.width(); i++) {
if(Math.floor(Math.random() * 32000) == 50) {
$(document.body).append($(document.createElement('img')).attr('class', 'papocchioneve').attr('src', arrNeveCadente[Math.floor(Math.random()*arrNeveCadente.length)]).attr('style', 'top: -25px; left: ' + i + 'px; z-index: ' + lastZIndex + ';'));
lastZIndex++;
}
}
if($('.papocchioneve').lenght > 100) $('.papocchioneve:first').remove();
}
addOnloadHook(function() {
window.w = $(window);
window.lastZIndex = 10000;
window.arrNeveCadente = new Array('http://images4.wikia.nocookie.net/__cb20111220155233/nonciclopedia/images/1/1b/Cucchiaio_di_legno_immagine_piccola.png', 'http://images1.wikia.nocookie.net/__cb20111220154715/nonciclopedia/images/a/a7/Fiocco_di_neve_piccolo.png', 'http://images4.wikia.nocookie.net/__cb20111220151347/nonciclopedia/images/9/9f/Papocchio_piccolo_29x25.png');
})
addOnloadHook(function(){setInterval(progressNeve, 37);});
*/
function compareEdits() {
$.get('/wiki/Speciale:Editcount/' + $('#utenteuno').val(), function(data) {
var div = $(data.split(' skin-monobook without-adsense">')[1].split('</body>')[0]);
editcol = $('.TablePager > tbody > tr > .ecrowright:nth(2)', div);
if(editcol.length != 1) $('#comparautenti').html('Utente 1 non valido!');
else {
$('#comparautenti').html($('#utenteuno').val() + ': ' + editcol.html());
window.utenteuno = parseInt(editcol.html().replace('.', ''));
$.get('/wiki/Speciale:Editcount/' + $('#utentedue').val(), function(data) {
var div = $(data.split(' skin-monobook without-adsense">')[1].split('</body>')[0]);
editcol = $('.TablePager > tbody > tr > .ecrowright:nth(2)', div);
if(editcol.length != 1) $('#comparautenti').html('Utente 2 non valido!');
else {
$('#comparautenti').html($('#comparautenti').html() + '<br>' + $('#utentedue').val() + ': ' + editcol.html() + '<br>' + 'Differenza di contributi: ' + Math.abs((parseInt(editcol.html().replace('.', ''))) - utenteuno));
}
});
}
});
}
function editsCompareWindow() {
$(document.body).append($('<div class="BG_nerotrasp_corto rad" style="width: 200px; height: 140px; position: fixed; top: 50%; left: 50%; border: solid 2px #00122B; z-index: 99999; background-color: #CED9FF; padding: 5px; text-align:center;">Quali utenti vuoi confrontare?<br />Utente 1: <input type="text" id="utenteuno"></input><br>Utente 2: <input type="text" id="utentedue"></input><br /><input type="button" value="Compara" onclick="compareEdits();"><br /><div id="comparautenti"></div><a href="javascript:void(0);" onclick="javascript:$(this).parent().remove();">Clicca per chiudere</a></div>'));
}
function createEditsButton() {
var menuList = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
var newLi = document.createElement('li');
newLi.setAttribute('id', 'ca-edits');
newLi.innerHTML = '<a href="javascript:editsCompareWindow();">EditsCompare</a>';
menuList.appendChild(newLi);
}
addOnloadHook(createEditsButton);
// FUNZIONI PER INGRANDIRE/RIMPICCIOLIRE IL CARATTERE DEI TESTI
//dimensione di default 100%
var dimensioneCarattere = 100;
function ingrandisciCarattere() {
if (dimensioneCarattere < 400) dimensioneCarattere += 10;
$("#bodyContent").css("font-size", dimensioneCarattere+"%");
}
function riduciCarattere() {
if (dimensioneCarattere > 30) dimensioneCarattere -= 10;
$("#bodyContent").css("font-size", dimensioneCarattere+"%");
}
$(document).ready( function() {
var d = '<div class="noprint" style="position:fixed; bottom:25px; right:0px; z-index:200"><a href="javascript:ingrandisciCarattere()"><img src="http://images1.wikia.nocookie.net/nonciclopedia/images/6/6f/Lente_di_ingrandimento_-_Zoom_in.png" title="Ingrandisci carattere" alt="Ingrandisci carattere" /></a> <a href="javascript:riduciCarattere()"><img src="http://images1.wikia.nocookie.net/nonciclopedia/images/b/b8/Lente_di_ingrandimento_-_Zoom_out.png" title="Riduci carattere" alt="Riduci carattere" /></a></div>';
$("#jump-to-nav").before(d);
});