Utente:Nonciclopediologo/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica |
Void (rosica | curriculum) m (Void ha spostato la pagina Utente:Gerry13/monobook.js a Utente:Nonciclopediologo/monobook.js: Pagina spostata automaticamente durante la rinomina dell'utente "Gerry13" a "Nonciclopediologo") |
||
(308 versioni intermedie di 2 utenti non mostrate) | |||
Riga 1: | Riga 1: | ||
disableAlert = true; |
|||
disablealertLoad=1; |
|||
disableHideEdit = true; |
|||
disablehideEdit=1; |
|||
buttonPurge = |
buttonPurge = true; |
||
var noNavSlide = false; |
var noNavSlide = false; |
||
var noMorphSFX = 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) { |
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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 15: | Riga 86: | ||
"sampleText": "Inserire qui il motivo"}; |
"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", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png", |
||
"speedTip": "Articolo in scadenza", |
"speedTip": "Articolo in scadenza", |
||
Riga 22: | Riga 107: | ||
"sampleText": "Note"}; |
"sampleText": "Note"}; |
||
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 42: | Riga 127: | ||
"tagClose": "", |
"tagClose": "", |
||
"sampleText": ""}; |
"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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
"imageFile": "http:// |
"imageFile": "http://images.wikia.com/nonciclopedia/images/2/2d/Iconcina_Accesso_negato.png", |
||
"speedTip": "Vandalo", |
"speedTip": "Vandalo", |
||
"tagOpen": "{{Vandalo", |
"tagOpen": "{{Vandalo", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": ""}; |
"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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 63: | Riga 148: | ||
"tagClose": "|firma=--~~" + "~~}" + "}\n\n", |
"tagClose": "|firma=--~~" + "~~}" + "}\n\n", |
||
"sampleText": ""}; |
"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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 77: | Riga 169: | ||
"tagClose": "}" + "}", |
"tagClose": "}" + "}", |
||
"sampleText": "Inserisci qui la pagina"}; |
"sampleText": "Inserisci qui la pagina"}; |
||
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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 94: | Riga 179: | ||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
"imageFile": "http://images.wikia.com/nonciclopedia/images/f/f9/Button_box.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/f/f9/Button_box.png", |
||
"speedTip": "Box", |
"speedTip": "Box vecchio stile", |
||
"tagOpen": '{| |
"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", |
"tagClose": "\n|}\n", |
||
"sampleText": "Inserire qui il testo interno"}; |
"sampleText": "Inserire qui il testo interno"}; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteRiquadro2; |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 109: | Riga 196: | ||
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png", |
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png", |
||
"speedTip": "stub", |
"speedTip": "stub", |
||
"tagOpen": "{{", |
"tagOpen": "{{Template|", |
||
"tagClose": "}" + "}", |
"tagClose": "}" + "}", |
||
"sampleText": " |
"sampleText": "Nome template"}; |
||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 172: | Riga 259: | ||
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png", |
"imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png", |
||
"speedTip": "Barrato", |
"speedTip": "Barrato", |
||
"tagOpen": " |
"tagOpen": "{{S|", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Barrato"}; |
"sampleText": "Barrato"}; |
||
Riga 179: | Riga 266: | ||
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/f/fd/Button_underline.png", |
"imageFile": "http://images4.wikia.nocookie.net/nonciclopedia/images/f/fd/Button_underline.png", |
||
"speedTip": "Sottolineato", |
"speedTip": "Sottolineato", |
||
"tagOpen": " |
"tagOpen": "{{U|", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Sottolineato"}; |
"sampleText": "Sottolineato"}; |
||
Riga 200: | Riga 287: | ||
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/58/Button_small.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/58/Button_small.png", |
||
"speedTip": "Piccolo", |
"speedTip": "Piccolo", |
||
"tagOpen": " |
"tagOpen": "{{Dimensione|80%|", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Piccolo"}; |
"sampleText": "Piccolo"}; |
||
Riga 207: | Riga 294: | ||
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/56/Button_big.png", |
"imageFile": "http://images.wikia.com/nonciclopedia/images/5/56/Button_big.png", |
||
"speedTip": "Grande", |
"speedTip": "Grande", |
||
"tagOpen": " |
"tagOpen": "{{Dimensione|125%|", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Grande"}; |
"sampleText": "Grande"}; |
||
Riga 214: | Riga 301: | ||
"imageFile": "http://images4.wikia.nocookie.net/__cb20100806112820/nonciclopedia/images/e/ea/Button_align_left.png", |
"imageFile": "http://images4.wikia.nocookie.net/__cb20100806112820/nonciclopedia/images/e/ea/Button_align_left.png", |
||
"speedTip": "Align left", |
"speedTip": "Align left", |
||
"tagOpen": ' |
"tagOpen": '{{Allinea|left|', |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Testo allineato a sinistra"}; |
"sampleText": "Testo allineato a sinistra"}; |
||
Riga 221: | Riga 308: | ||
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112819/nonciclopedia/images/f/f7/Button_align_center.png", |
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112819/nonciclopedia/images/f/f7/Button_align_center.png", |
||
"speedTip": "Align center", |
"speedTip": "Align center", |
||
"tagOpen": " |
"tagOpen": "{{Allinea|center|", |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Testo centrato"}; |
"sampleText": "Testo centrato"}; |
||
Riga 228: | Riga 315: | ||
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112825/nonciclopedia/images/a/a5/Button_align_right.png", |
"imageFile": "http://images1.wikia.nocookie.net/__cb20100806112825/nonciclopedia/images/a/a5/Button_align_right.png", |
||
"speedTip": "Align right", |
"speedTip": "Align right", |
||
"tagOpen": ' |
"tagOpen": '{{Allinea|right|', |
||
"tagClose": " |
"tagClose": "}}", |
||
"sampleText": "Testo allineato a destra"}; |
"sampleText": "Testo allineato a destra"}; |
||
Riga 240: | Riga 327: | ||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
"imageFile": "http:// |
"imageFile": "http://static2.wikia.nocookie.net/__cb20140212194353/nonciclopedia/images/d/d5/Button_noinclude.png", |
||
"speedTip": "<noinclude>", |
"speedTip": "<noinclude>", |
||
"tagOpen": "<noinclude>", |
"tagOpen": "<noinclude>", |
||
Riga 247: | Riga 334: | ||
mwCustomEditButtons[mwCustomEditButtons.length] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
"imageFile": "http:// |
"imageFile": "http://static2.wikia.nocookie.net/__cb20140212194352/nonciclopedia/images/6/63/Button_includeonly.png", |
||
"speedTip": "<includeonly>", |
"speedTip": "<includeonly>", |
||
"tagOpen": "<includeonly>", |
"tagOpen": "<includeonly>", |
||
"tagClose": "</includeonly>", |
"tagClose": "</includeonly>", |
||
"sampleText": "Includi solo qui"}; |
"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] = { |
mwCustomEditButtons[mwCustomEditButtons.length] = { |
||
Riga 306: | Riga 386: | ||
"speedTip": "Dimensione", |
"speedTip": "Dimensione", |
||
"tagOpen": "{{Dimensione|dim%|", |
"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": "}}", |
"tagClose": "}}", |
||
"sampleText": "Testo"}; |
"sampleText": "Testo"}; |
||
Riga 350: | Riga 437: | ||
"tagClose": "</ref>", |
"tagClose": "</ref>", |
||
"sampleText": "Inserisci qui il testo della nota"}; |
"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|}' + '}'; |
|||
} |
|||
); |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteVideo; |
|||
/* Live preview */ |
|||
/*addOnloadHook(function() { import_script((wgAction == 'edit'|| wgAction == 'submit'), "Nonciclopedia:Script/Anteprima.js");})*/ |
|||
mwCustomEditButtons[mwCustomEditButtons.length] = pulsanteManuali; |
|||
} |
|||
/* ----------------------------------------------- VF ------------------------------------------------ */ |
|||
/* FakeMSN */ |
|||
function VF() { |
|||
if(!$('#toolbar').length) { |
|||
if (wgAction != 'view' || wgPageName != "Utente:Zazjlops/sandbox") return false; |
|||
return; |
|||
var httpRequest; |
|||
} |
|||
if (window.XMLHttpRequest) { // Mozilla, Safari, ... |
|||
if(wgCurRevisionId) { |
|||
httpRequest = new XMLHttpRequest(); |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}'; |
|||
} else if (window.ActiveXObject) { // IE |
|||
} |
|||
httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); |
|||
else { |
|||
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}'; |
|||
} |
} |
||
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; |
|||
} |
} |
||
hooksCustom.push(VF); |
|||
/* ------------------------------------------ Link in basso ------------------------------------------ */ |
|||
/* Link al DPL Restauro */ |
/* Link al DPL Restauro */ |
||
function createDPLlink() { |
function createDPLlink() { |
||
Riga 418: | Riga 465: | ||
var newLi = document.createElement('li'); |
var newLi = document.createElement('li'); |
||
newLi.setAttribute('id', 'pt-DPLlink'); |
newLi.setAttribute('id', 'pt-DPLlink'); |
||
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Nonciclopedia:Progetto_Restauro/DPLMonitor/ |
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"> </a>'; |
||
menuList.appendChild(newLi); |
menuList.appendChild(newLi); |
||
} |
} |
||
addOnloadHook(createDPLlink); |
addOnloadHook(createDPLlink); |
||
/* Link |
/* Link al Memo */ |
||
function |
function createMemolink() { |
||
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0]; |
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0]; |
||
var newLi = document.createElement('li'); |
var newLi = document.createElement('li'); |
||
newLi.setAttribute('id', 'pt- |
newLi.setAttribute('id', 'pt-Memolink'); |
||
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/ |
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Utente:Nonciclopediologo/Memo" title="Guarda i memo! [alt-shift-2]" accesskey="1"> </a>'; |
||
menuList.appendChild(newLi); |
menuList.appendChild(newLi); |
||
} |
} |
||
addOnloadHook( |
addOnloadHook(createMemolink); |
||
/* Link al numero di EDIT */ |
/* Link al numero di EDIT */ |
||
Riga 438: | Riga 485: | ||
var newLi = document.createElement('li'); |
var newLi = document.createElement('li'); |
||
newLi.setAttribute('id', 'pt-EDITlink'); |
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"> |
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Speciale:Editcount/Nonciclopediologo" title="Numero di cazzate inserite su Nonciclopedia! [alt-shift-3]" accesskey="1"> </a>'; |
||
menuList.appendChild(newLi); |
menuList.appendChild(newLi); |
||
} |
} |
||
addOnloadHook(createEDITlink); |
addOnloadHook(createEDITlink); |
||
/* Link alla pagina BAN */ |
|||
/* Modifiche correlate al DPL Restauro */ |
|||
function |
function createBanlink() { |
||
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0]; |
var menuList = document.getElementById('p-personal').getElementsByTagName('ul')[0]; |
||
var newLi = document.createElement('li'); |
var newLi = document.createElement('li'); |
||
newLi.setAttribute('id', 'pt- |
newLi.setAttribute('id', 'pt-Banlink'); |
||
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/ |
newLi.innerHTML = '<a href="http://nonciclopedia.wikia.com/wiki/Nonciclopedia:Vandali_da_bannare" title="Banna il vandalo [alt-shift-4]" accesskey="1"> </a>'; |
||
menuList.appendChild(newLi); |
menuList.appendChild(newLi); |
||
} |
} |
||
addOnloadHook( |
addOnloadHook(createBanlink); |
||
/* ------------------------------------------ Link in basso ------------------------------------------ */ |
|||
/* Ultime immagini caricate */ |
|||
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); |
|||
Riga 472: | Riga 510: | ||
return; |
return; |
||
var newLink = wgServer + wgScript + '?title=' + wgPageName + '&diff=0'; |
var newLink = wgServer + wgScript + '?title=' + wgPageName + '&diff=0'; |
||
addPortletLink('p-cactions', newLink, ' |
addPortletLink('p-cactions', newLink, 'Mod 0', 'ca-ledit', 'Ultima modifica', 'u'); |
||
} |
} |
||
addLoadEvent(lastEdit); |
addLoadEvent(lastEdit); |
||
/* Modifica della sezione 0 *** Prelevato da Wikipedia */ |
|||
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 */ |
/* Cassetto caratteri modifica aperto */ |
||
Riga 494: | Riga 520: | ||
return; |
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"); |
|||
Riga 545: | Riga 526: | ||
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' |
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' |
||
+ '&action=raw&ctype=text/javascript"></' + 'script>'); |
+ '&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 */ |
/* To Top */ |
||
Riga 589: | Riga 534: | ||
//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top). |
//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]}, |
setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, |
||
controlHTML: '<img src="http://img31.imageshack.us/img31/7153/arrowv.png" style="width: |
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: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 |
anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links |
||
Riga 657: | Riga 602: | ||
addOnloadHook(ToTop); |
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);*/ |
|||
/* Edit current version */ |
|||
addOnloadHook(editcurrentid); |
|||
import_script(1,'Nonciclopedia:Script/Votazione.js'); |
|||
// ================================================================================ |
// ================================================================================ |
||
Riga 683: | Riga 612: | ||
var url=document.getElementById('ca-delete').firstChild.href |
var url=document.getElementById('ca-delete').firstChild.href |
||
if(document.getElementById('content').innerHTML.indexOf('submitdelete')!=-1) { |
if(document.getElementById('content').innerHTML.indexOf('submitdelete')!=-1) { |
||
alert('Attenzione: È stato trovato un link &submitdelete. Attento a dove clicchi!'); |
/* alert('Attenzione: È stato trovato un link &submitdelete. Attento a dove clicchi!'); */ |
||
} |
} |
||
if(wgNamespaceNumber == 6) addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent(' |
if(wgNamespaceNumber == 6) addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('Cancellazione veloce') ,'elimina veloce','ca-delete1'); |
||
} |
} |
||
Riga 716: | Riga 645: | ||
// @include http://nonciclopedia.wikia.com/* |
// @include http://nonciclopedia.wikia.com/* |
||
// ==/UserScript== |
// ==/UserScript== |
||
function |
function clockInit() { |
||
my_div = document.getElementById("searchform"); |
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; |
my_div.innerHTML = '<div id="orologio" style="color:darkblue; font-weight:bold; position:relative; right:3px; top:2px;"></div>' + my_div.innerHTML; |
||
orologio=document.getElementById('orologio'); |
window.orologio=document.getElementById('orologio'); |
||
setInterval(benv, 1000); |
|||
} |
} |
||
function benv() { |
function benv() { |
||
var now = new Date(); |
var now = new Date(); |
||
Riga 734: | Riga 664: | ||
} |
} |
||
addOnloadHook(clockInit); |
|||
setInterval(benv, 1000); |
|||
/* Funzione add or remove to Sidebar */ |
|||
addOnloadHook(init); |
|||
function ModifySidebar(action, section, name, link) { |
|||
addOnloadHook(benv); |
|||
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")); |
|||
} |
|||
} |
Versione attuale delle 19:30, 18 feb 2019
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"> </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"> </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"> </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"> </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"));
}
}