Utente:Nonciclopediologo/vector-2022.js

Vai alla navigazione Vai alla ricerca

Questa pagina definisce alcuni parametri di aspetto e comportamento generale di tutte le pagine. Per personalizzarli vedi Aiuto:Stile utente.


Nota: dopo aver salvato è necessario pulire la cache del proprio browser per vedere i cambiamenti, e comunque qualche minuto di preghiera non guasta. Per Mozilla / Firefox / Safari: fare clic su Ricarica tenendo premuto il tasto delle maiuscole, oppure premere Ctrl-F5 o Ctrl-R (Command-R su Mac); per Chrome premere Ctrl-Shift-R (Command-Shift-R su un Mac); per Konqueror: premere il pulsante Ricarica o il tasto F5; per Opera può essere necessario svuotare completamente la cache dal menu Strumenti → Preferenze; per Internet Explorer: mantenere premuto il tasto Ctrl mentre si preme il pulsante Aggiorna o premere Ctrl-F5.

disableAlert = true;
disableHideEdit = true;
buttonPurge = true;
var noNavSlide = false; 
var noMorphSFX = false;
condividiChiuso = true;
progettiChiuso = true;
comunitaChiuso = true;
strumentiChiuso = false;
lingueChiuso = true;
wikiaChiuso = true;
/* mona = true; - Funzione storica durante la battaglia con Wikia */

/* Disattivazione tasto elimina nel sitenotice per campagna donazioni - Per chi volesse disattivare il sitenotice del tutto dovrà inserire #siteNotice { display:none; } Nel proprio monobook.css */

/* addOnloadHook(function(){$('a[href="javascript:dismissNotice();"]').parent().hide()}); */

/********* Nuovo Stile discussioni e indentazione - da inserire prima o poi, dopo controllo di MFH :asd: *********/
    function GenuzzuIndentStyle(parent) {
             var html = parent.html();
             var matches = html.split(/(?:(<dl>|<\/dl>|<dd>|<\/dd>)| (?:AND|OR) )/);
             var separators = html.match(/(?:(<dl>|<\/dl>|<dd>|<\/dd>)| (?:AND|OR) )/g);
             var pos = html.search(/(<dl>|<\/dl>|<dd>|<\/dd>)/);
             if(separators != null) {
                for (var i=0; i<separators.length; ++i) {
                   if(pos == 0) matches[i * 2 + 1] = separators[i];
                   else matches[i * 2] = separators[i];
                }
             }
             html = '';
             for(var match in matches) {
                if(matches[match] != '<dl>' && matches[match] != '</dl>' && matches[match] != '<dd>' && matches[match] != '</dd>' && matches[match] != '' && matches[match] != '\n') {
                   html += '<div class="IndentStyle">' + matches[match] + '</div>';
                }
                else {
                   html += matches[match];
                }
             }
             $(parent).html(html);
    }

    function oc(a)
    {
      var o = {};
      for(var i=0;i<a.length;i++)
      {
        o[a[i]]='';
      }
      return o;
    }

    $(document).ready(function() {
       if(wgNamespaceNumber in oc([1, 13, 15, 7, 119, 129, 9, 5, 121, 123, 117, 113, 131, 11, 125, 3, 401])) {
          $('#bodyContent dl, #bodyContent p, #bodyContent ul, #bodyContent li, #bodyContent ol').each(function() {if($(this).html().search(/\(CES?T\)/) != -1) GenuzzuIndentStyle($(this))});
       }
    });

/************ Import script ************/
/* Votazione id */
importScript('Nonciclopedia:Script/Votazione.js', true);
/* Searchbox approvato */
importScript('Nonciclopedia:Script/Searchbox.js', (wgAction=='edit' || wgAction == 'submit'));
/* LiveRC */
importScript('Nonciclopedia:LiveRC/LiveRC.js', (wgPageName == 'Nonciclopedia:LiveRC'));
/************ Import script ************/

/************ Posizionamento edit **********/
/* if(wgAction == 'edit') $(function() {location.hash = 'wpTextbox1';}); */
if(wgAction == 'edit') $(function() {location.hash = 'toolbar';});

/************ Pulsanti edit ************/
if (mwCustomEditButtons) {

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://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/b/bf/Bottone_fantasia.png",
     "speedTip": "Fantasia personale",
     "tagOpen": "{{Cancellazione|motivo=fantasia|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://images.wikia.com/nonciclopedia/images/9/92/Iconcina_Attenzione.png",
     "speedTip": "Avvertimento",
     "tagOpen": "{{",
     "tagClose": "}}",
     "sampleText": "avvertimento"};
 
mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/nonciclopedia/images/2/2d/Iconcina_Accesso_negato.png",
     "speedTip": "Vandalo",
     "tagOpen": "{{Vandalo",
     "tagClose": "}}",
     "sampleText": ""};

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 vecchio stile",
     "tagOpen": '{| style="width:100%; margin:.5em auto; 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] = pulsanteRiquadro2;

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": "{{Template|",
     "tagClose": "}" + "}",
     "sampleText": "Nome template"};

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://static2.wikia.nocookie.net/__cb20140212194353/nonciclopedia/images/d/d5/Button_noinclude.png",
     "speedTip": "<noinclude>",
     "tagOpen": "<noinclude>",
     "tagClose": "</noinclude>",
     "sampleText": "Non includere"};

 mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://static2.wikia.nocookie.net/__cb20140212194352/nonciclopedia/images/6/63/Button_includeonly.png",
     "speedTip": "<includeonly>",
     "tagOpen": "<includeonly>",
     "tagClose": "</includeonly>",
     "sampleText": "Includi solo qui"};

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://img2.wikia.nocookie.net/__cb20140408123004/nonciclopedia/images/b/b5/Bottone_evidenziatore.png",
     "speedTip": "Evidenziatore",
     "tagOpen": "{{Evidenzia|giallo|",
     "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;

mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteVideo;

mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteManuali;
}

/* ----------------------------------------------- VF ------------------------------------------------ */
function VF() {
	if(!$('#toolbar').length) {
		return;
	}
	if(wgCurRevisionId) {
		mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
	}
	else {
		mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
	}
}
hooksCustom.push(VF);

/* ------------------------------------------ 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/CFPTemplate" title="Controlla il lavoro ancora da fare! [alt-shift-1]" accesskey="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';
  menuList.appendChild(newLi);
}
addOnloadHook(createDPLlink);

/* Link al Memo */
function createMemolink() {
  var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
  var newLi = document.createElement('li');
  newLi.setAttribute('id', 'pt-Memolink');
  newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Utente:Nonciclopediologo/Memo" title="Guarda i memo! [alt-shift-2]" accesskey="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';
  menuList.appendChild(newLi);
}
addOnloadHook(createMemolink);

/* 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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';
  menuList.appendChild(newLi);
}
addOnloadHook(createEDITlink);

/* Link alla pagina BAN */
function createBanlink() {
  var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0];
  var newLi = document.createElement('li');
  newLi.setAttribute('id', 'pt-Banlink');
  newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Nonciclopedia:Vandali_da_bannare" title="Banna il vandalo [alt-shift-4]" accesskey="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';
  menuList.appendChild(newLi);
}
addOnloadHook(createBanlink);
/* ------------------------------------------ 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, 'Mod 0', 'ca-ledit', 'Ultima modifica', 'u');
}
addLoadEvent(lastEdit);

/* Cassetto caratteri modifica aperto */
addOnloadHook(function () {
	if (wgAction != 'edit') return;
	collapseTable(0);
	return;
});


/* 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>');

/* 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:1325, 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);


// ================================================================================
// 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('Cancellazione veloce') ,'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", "LiveRC", "http://nonciclopedia.wikia.com/wiki/Nonciclopedia:LiveRC");
    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", "Uncyclopedia", "http://uncyclopedia.wikia.com/wiki/" + wgPageName);
    ModifySidebar("add", "navigation", "PDF Web2PDF", "http://www.web2pdfconvert.com/convert.aspx");
    ModifySidebar("add", "navigation", "PDF Printfreindly", "http://www.printfriendly.com/print?url=http://nonciclopedia.wikia.com/wiki/" + wgPageName);


    //removes [[Special:Upload]] from toolbox
    //ModifySidebar("remove", "toolbox", "Upload file", "http://en.wikipedia.org/wiki/Special:Upload");

}
 
hooksCustomRender.push(CustomizeModificationsOfSidebar);


/* 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"); */
  }
});

// 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);
 });



/* Laboratorio prove */

function CustomSharedNewsBox() {
	var href = $("http://nonciclopedia.wikia.com/wiki/MediaWiki:Shared-News_box").attr('href');
	if(href) {
		$("http://nonciclopedia.wikia.com/wiki/MediaWiki:Shared-News_box").attr('href', href.replace("http://nonciclopedia.wikia.com/wiki/MediaWiki:Custom-Shared-News_box"));
	}
}