//<pre>
var myButtons = [[2,"{{Bio\\n|Titolo = \\n|Nome = \\n|Cognome = \\n|PostCognome = \\n|ForzaOrdinamento = \\n|Sesso = M\\n|PreData = \\n|LuogoNascita = \\n|LuogoNascitaLink = \\n|GiornoMeseNascita = \\n|AnnoNascita = \\n|LuogoMorte = \\n|LuogoMorteLink = \\n|GiornoMeseMorte = \\n|AnnoMorte = ?\\n|Attività = \\n|Nazionalità = \\n|PostNazionalità = \\n|Immagine = \\n|Didascalia =\\n|FineIncipit = \\n|Categorie = \\n}}\\n","","Bio",500,""],[2,"{{Infobox conflitto\\n|Nome del conflitto = \\n|Tipo = \\n|Parte_di = \\n|Immagine = \\n|Didascalia = \\n|Data = \\n|Luogo = \\n|Casus = \\n|Mutamenti_territoriali = \\n|Esito = \\n|Schieramento1 = \\n|Schieramento2 = \\n|Comandante1 = [[Immagine:White flag icon.svg|16px]]\\n|Comandante2 = \\n|Effettivi1 = \\n|Effettivi2 = \\n|Perdite1 = \\n|Perdite2 = \\n|Perdite3 = \\n|Note = \\n}}\\n","","Infobox conflitto",0,""],[2,"{{Box successione\\n|carica = \\n|immagine = \\n|periodo = \\n|precedente = \\n|successivo = \\n}}","","Box successione",92,""],[2,"{{Divisione amministrativa\\n|Nome = \\n|Nome ufficiale = <!-- in formato {{Lingue|xx}} [Nome ufficiale] --> \\n|Panorama = <!-- solo nome del file (es. wikilogo.png) --> \\n|Didascalia = \\n|Bandiera = <!-- solo nome del file (es. wikilogo.png) --> \\n|Stemma = <!-- solo nome del file (es. wikilogo.png) --> \\n|Stato = <!-- Codice ISO del Paese --> \\n|Grado amministrativo = <!-- Grado della divisione amministrativa di cui tratta la voce --> \\n|Divisione amm grado 1 = \\n|Divisione amm grado 2 = \\n|Divisione amm grado 3 = \\n|Divisione amm grado 4 = \\n|Capoluogo = \\n|Amministratore locale = \\n|Partito = \\n|Data elezione = \\n|Data istituzione = \\n|Latitudine gradi = \\n|Latitudine minuti = \\n|Latitudine secondi = \\n|Latitudine NS = \\n|Longitudine gradi = \\n|Longitudine minuti = \\n|Longitudine secondi = \\n|Longitudine EW = \\n|Altitudine = \\n|Superficie = \\n|Note superficie = \\n|Abitanti = <!-- NON usare il separatore delle migliaia --> \\n|Note abitanti = \\n|Aggiornamento abitanti = <!-- in stile abbreviato (es. 28-5-1990) --> \\n|Sottodivisioni = <!-- Numero di sottodivisioni dirette. Se sono meno di cinque, è possibile elencarle per nome --> \\n|Divisioni confinanti = <!-- Elenco delle divisioni amministrative dello stesso livello confinanti --> \\n|Lingue = <!-- altre lingue (NON dialetti) parlate storicamente nella zona, solo se diverse dalle lingue ufficiali e dalla lingua nazionale --> \\n|Codice postale = \\n|Prefisso = \\n|Fuso orario = <!-- in formato UTC senza premettere alcunché (es. +1) --> \\n|Codice ISO = <!-- Codice ISO 3166-2 della divisione amministrativa --> \\n|Codice statistico = \\n|Targa = \\n|Nome abitanti = \\n|Immagine localizzazione = \\n|Mappa = \\n|Sito = <!-- Sito ufficiale della divisione amministrativa --> \\n}}\\n","","Divisione amministrativa",0,""],[2,"{{Infobox militare \\n|Nome = \\n|Immagine = \\n|Didascalia = \\n|Soprannome = \\n|Data_di_nascita = \\n|Nato_a = \\n|Data_di_morte = \\n|Morto_a = \\n|Cause_della_morte = \\n|Luogo_di_sepoltura = \\n|Etnia = <!-- solo se enciclopedica -->\\n|Religione = <!-- solo se enciclopedica -->\\n|Nazione_servita = \\n|Forza_armata = \\n|Arma = \\n|Corpo = \\n|Specialità = \\n|Unità = \\n|Reparto = \\n|Anni_di_servizio = \\n|Grado = \\n|Ferite = \\n|Comandanti = \\n|Guerre = \\n|Campagne = \\n|Battaglie = \\n|Comandante_di = \\n|Decorazioni = \\n|Studi_militari = \\n|Pubblicazioni = \\n|Frase_celebre = \\n|Altro_lavoro = \\n|Altro_campo = \\n|Altro = \\n|Note = \\n|Ref = \\n}}","","Militare",0,""]];
var myLinks = new Array(['Voce su en.wiki','http://en.wikipedia.org/wiki/%TITOLO%'],['Voce su Commons','http://commons.wikimedia.org/wiki/Image:%TITOLO2%'],['Vecchio Edit-count','http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=Jalo&dbname=itwiki_p']);
// Elenco dei tool da caricare.
// Firefox
var myLinks = new Array(['Cancella subito','//it.wikipedia.org/wiki/Categoria:Cancellare_subito'],['Nuove pagine','//it.wikipedia.org/wiki/Speciale:PaginePi%C3%B9Recenti'],['Richieste admin','//it.wikipedia.org/wiki/Wikipedia:Richieste_agli_amministratori'],['PdS','//it.wikipedia.org/wiki/Utente:Buggia/PdS']);
//CONFIGURAZIONE POPUP
var myButtons = new Array([1,'{{F||{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}','0','+F',0,'senza fonti '],[1,'{{F|biografie|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}','0','+F bio',0,'senza fonti '],[2,'*\'\'\'[[]]\'\'\'','','Dis',11,''],[1,'<noinclude>{{Protetta}}</noinclude>','0','Protetta',0,'+Protetta '],[1,'{{BloccoNomeUtente}}~~~~','1','NUI',0,'NUI'],[1,'{{BloccoInfinito}}','1','BloccoInfinito',0,''], [1,'{{IP vandalismo}}','0','IP vandalismo',0,'IP vandalismo '],[1,'{{NoWebHost}}~~~~','1','NoWebHost',0,'']);
popupDelay = 2; // aspetta 2 secondi
popupQueriedRevertSummary = "Rollback da popup. Ripristinata la versione di $3";
popupFixRedirs = true;
popupRedirAutoClick = 'wpSave';
popupFixDabs = true;
popupDabsAutoClick = 'wpSave';
//MOSTRA I TATTOO
var toLoad = "tabs uec unw fat nfat aiu con pov wiki stu enc cat test prom canc yc rc spam ndis ref sef port scorp aw ssen aviol avv date linkcomplete lrc vand blk case nms avand requi";
mw.loader.load("//it.wikipedia.org/w/index.php?title=Utente:Jalo/Tatoo.js&action=raw&ctype=text/javascript");
//NASCONDI IL COPYWARN SOTTO LA CASELLA DI MODIFICA
var disableRipristina="true";
$( document ).ready ( function ()
//Monobook Modulare
//Lancia il vero monobook
// Vedi [[Wikipedia:Monobook.js/MonobookCompleto.js]]
//
document.writeln('<script type="text/javascript" src="/w/index.php?title=Wikipedia:Monobook.js/MonobookCompleto.js&oldid=32712401&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</pre>
// [[:en:User:Zocky/LinkComplete.js]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Zocky/LinkComplete.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// Tool scritto da Utente:Jalo cfr. Wikipedia:Bar/Discussioni/Ricerca_automatica_nel_testo
function getScrollXY() {
var scrOfX = 0, scrOfY = 0;
if( typeof( window.pageYOffset ) == 'number' ) {
//Netscape compliant
scrOfY = window.pageYOffset;
scrOfX = window.pageXOffset;
} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
//DOM compliant
scrOfY = document.body.scrollTop;
scrOfX = document.body.scrollLeft;
} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
//IE6 standards compliant mode
scrOfY = document.documentElement.scrollTop;
scrOfX = document.documentElement.scrollLeft;
}
return [ scrOfX, scrOfY ];
}
function hidePopup()
{
if (document.getElementById("cercaPopupeditpage-copywarn").style.display = "none";)
document.getElementById("editpage-copywarn").style.display="none";
}
function showPopup(testo, x, y)
{
scrolling = getScrollXY();
popup = document.getElementById("cercaPopup");
popup.style.left = (x+scrolling[0]+5)+"px";
popup.style.top = (y+scrolling[1]-5-37)+"px";
popup.style.display = "block";
// popup.onclick = function(){window.open('http://it.wikipedia.org/w/index.php?title=Speciale%3ARicerca&search='+encodeURIComponent(testo), 'searchPage'+Math.random());};
popup.onclick = function(){window.open('http://it.wikipedia.org/w/index.php?title=Speciale%3ARicerca&search='+encodeURIComponent(testo), 'searchPage'+x);};
}
if (wgAction=="view")
addLoadEvent ( function ()
{
var listenerMouseUp = function(e){
e = (e) ? e : ((window.event) ? window.event : null);
if(e){
if(navigator.appName=='Microsoft Internet Explorer' && navigator.userAgent.indexOf("Opera")==-1) //IE
var t = document.selection.createRange().text;
else //Non-IE
var t = document.getSelection ? document.getSelection().toString() : window.getSelection().toString();
t = t.replace(/^\s+/, '').replace(/\s+$/, ''); //trim
if (t)
showPopup(t, e.clientX, e.clientY);
else
hidePopup();
}
}
if (window.addEventListener)
window.addEventListener('mouseup', listenerMouseUp, false); //Non-IE
else
document.onmouseup = listenerMouseUp; //IE
var img= (BrowserDetect.browser=="Explorer")? new Image() : document.createElement('img');
img.id = 'cercaPopup';
img.src = 'http://upload.wikimedia.org/wikipedia/commons/e/ee/Nuvola_apps_comic_strip-cerca.png';
img.style.height="37px";
img.style.position = "absolute";
img.style.width = "50px";
img.style.zIndex = 3;
img.style.cursor = "help";
img.style.display = "none";
document.getElementsByTagName("body")[0].appendChild(img);
})
/*</pre>
== Batch Delete ==
<pre>*/
/* Ajax batch delete thingy, version [0.1.1b]
Originally from: http://en.wikipedia.org/wiki/User:Splarka/ajaxbatchdelete.js
Tradotto e ampliato da [[Utente:Wim_b]]
Notes:
* It is a bit verbose, after debugging perhaps some output should be removed.
* It waits 1 second after every delete before starting the next.
* Can be aborted by simply deleting the contents of the textarea, or leaving the page.
* Stops when it hits a blank line.
* Nonfatal errors (skip to next line):
** Bad character or malformed line
** Bad token
** Unexpected response
* Pauses in execution can be added with a blank line.
To do:
* Cache the token if two the same?
** Please note the delete token is not guaranteed to be static, but currently it always is.
*/
addOnloadHook(function() {
addPortletLink('p-tb','/wiki/Special:BlankPage?blankspecial=ajaxbd&useskin=monobook','Batch Delete');
});
if(wgCanonicalSpecialPageName && wgCanonicalSpecialPageName.toLowerCase() == 'blankpage' && queryString('blankspecial') == 'ajaxbd') {
document.title = 'Ajax Batch Deletion';
addOnloadHook(abdForm);
}
function abdForm() {
addPortletLink('p-tb','/wiki/Special:Log/delete?user=' + encodeURIComponent(wgUserName),'My delete log');
//subvert this Special: page to our own needs.
var con = document.getElementById('content') || document.getElementById('mw_content');
var bcon = document.getElementById('bodyContent') || document.getElementById('mw_contentholder');
var fh = getElementsByClassName(con,'h1','firstHeading')[0];
while(fh.firstChild) fh.removeChild(fh.firstChild)
fh.appendChild(document.createTextNode('Ajax Batch Deletion'));
for(var i=0;i<bcon.childNodes.length;i++) {
bcur = bcon.childNodes[i];
if(bcur.id != 'siteSub' && bcur.id != 'contentSub' && bcur.className != 'visualClear') {
while(bcur.firstChild) bcur.removeChild(bcur.firstChild)
if(bcur.nodeType == 3) bcur.nodeValue = '';
}
}
//generate content
var form = document.createElement('form');
form.appendChild(document.createTextNode('Lista delle pagine da cancellare:'));
form.appendChild(document.createElement('p'));
form.setAttribute('action','javascript:void(0);');
var txt = document.createElement('textarea');
txt.style.height = '20em';
txt.style.width = '50%';
txt.setAttribute('id','abd-textarea');
form.appendChild(txt);
form.appendChild(document.createElement('p'));
var lab1 = document.createElement('label');
lab1.setAttribute('for','abd-reason')
lab1.appendChild(document.createTextNode('Oggetto delle cancellazioni: '));
form.appendChild(lab1);
var inp1 = document.createElement('input');
inp1.style.width = '20em';
inp1.setAttribute('type','text');
inp1.setAttribute('id','abd-reason');
form.appendChild(inp1);
form.appendChild(document.createElement('p'));
var sub1 = document.createElement('input');
sub1.setAttribute('type','button');
sub1.setAttribute('id','abd-startbutton');
sub1.setAttribute('value','start');
sub1.setAttribute('onclick','abdStart()');
form.appendChild(sub1);
bcon.appendChild(form);
var pre = document.createElement('pre');
pre.setAttribute('id','abd-output');
bcon.appendChild(pre);
}
$('#abd-reason').next().prepend('<select id="wpBatchDeleteReasons"><option value="Altro">Altre ragioni</option>'
+'<option>([[WP:IMMEDIATA|C1]]) Pagina vuota, di prova, senza senso o tautologica</option>'
+'<option>([[WP:IMMEDIATA|C2]]) Pagina contenente solo frasi volgari, diffamatorie o denigratorie</option>'
+'<option>([[WP:IMMEDIATA|C3]]) Pagina scritta in un\'altra lingua o tradotta con traduttori automatici</option>'
+'<option>([[WP:IMMEDIATA|C4]]) Contenuto palesemente [[WP:E|non enciclopedico]] o [[WP:P|promozionale]], [[WP:WNCV|CV]]</option>'
+'<option>([[WP:IMMEDIATA|C6]]) Categoria vuota e/o sostituita</option>'
+'<option>([[WP:IMMEDIATA|C7]]) Pagina già cancellata per decisione comunitaria e reinserita senza valido motivo</option>'
+'<option>([[WP:IMMEDIATA|C9]]) Redirect non funzionante, con titolo errato o [[WP:Redirect|non conforme]] e orfano</option>'
+'<option>([[WP:IMMEDIATA|C13]]) Testo in [[WP:C|violazione di copyright]] da</option>'
+'<option>([[WP:IMMEDIATA|C15]]) Pagina utente [[WP:PU|non appropriata]]</option>'
+'<option>([[WP:IMMEDIATA|C16]]) Voce trasferita su un altro progetto Wikimedia</option>'
+'<option>([[WP:IMMEDIATA|C17]]) Come da richiesta dell\'utente al quale è riferita la sottopagina</option>'
+'<option>([[WP:IMMEDIATA|C19]]) Template obsoleto, sostituito e orfano</option>'
+'<option>Prova del gadget per le cancellazioni</option></select>');
//test
function abdStart() {
//mw.loader.load('http://localhost:8080/Olimpo/isp/intesasanpaolo.com.js');
document.getElementById('abd-startbutton').setAttribute('disabled','disabled');
//importStylesheet('Utente:Jalo/Sandbox2');
var out = document.getElementById('abd-output');
//</pre>
var txt = document.getElementById('abd-textarea');
var deletes = txt.value.split('\n');
var page = deletes[0];
if(page == '') {
out.appendChild(document.createTextNode('* fatto! Non resta altro da fare, o la riga successiva è vuota.\n'));
document.getElementById('abd-startbutton').removeAttribute('disabled');
} else {
var badchars = /(\#|\<|\>|\[|\]|\{|\}|\|)/;
if(badchars.test(page)) {
out.appendChild(document.createTextNode('! trovato un carattere non ammesso, la pagina' + page + ' è stata ignorata\n'));
setTimeout('abdStart()',1000);
} else {
out.appendChild(document.createTextNode('> Tento di cancellare [[' + page + ']]\n'));
abdGetToken(page);
}
}
deletes = deletes.slice(1,deletes.length);
txt.value = deletes.join('\n');
}
function abdGetToken(page) {
var out = document.getElementById('abd-output');
out.appendChild(document.createTextNode(' > Recupero delete token per [[' + page + ']]\n'));
var url = wgScriptPath + '/api.php?action=query&prop=info&indexpageids=1&intoken=delete&format=json&titles=' + encodeURIComponent(page);
var req = sajax_init_object();
req.open('GET', url, true);
req.onreadystatechange = function() {
if(req.readyState == 4 && req.status == 200) {
eval("abdDelete(" + req.responseText + ",'" + req.responseText.replace(/\'/g,"`") + "','" + page + "')");
}
}
req.send(null);
}
function abdDelete(obj,txt,page) {
var out = document.getElementById('abd-output');
if(obj['error']) {
out.appendChild(document.createTextNode(' ! Errore nelle API: ' + obj['error']['code'] + ' - ' + obj['error']['info'] + '\n'));
return;
}
if(!obj['query'] || !obj['query']['pageids'] || !obj['query']['pages'][obj['query']['pageids'][0]] || !obj['query']['pages'][obj['query']['pageids'][0]]['deletetoken']) {
out.appendChild(document.createTextNode(' ? Unexpected response: ' + txt + '\n'));
return;
}
var token = obj['query']['pages'][obj['query']['pageids'][0]]['deletetoken'];
out.appendChild(document.createTextNode(' > Token trovato, attendere la cancellazione\n'));
var reason = document.getElementById('abd-reason').value;
var params = 'action=delete&format=json&token=' + encodeURIComponent(token) + '&title=' + encodeURIComponent(page) + '&reason=' + encodeURIComponent(reason);
var url = wgScriptPath + '/api.php';
var req = sajax_init_object();
req.open('POST', url, true);
req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
req.setRequestHeader('Content-length', params.length);
req.setRequestHeader('Connection', 'close');
req.onreadystatechange = function() {
if(req.readyState == 4 && req.status == 200) {
eval("abdDeleteAftermath(" + req.responseText + ",'" + req.responseText.replace(/\'/g,"`") + "')");
}
}
req.send(params);
}
function abdDeleteAftermath(obj,txt) {
var out = document.getElementById('abd-output');
if(obj['error']) {
out.appendChild(document.createTextNode(' ! Api error: ' + obj['error']['code'] + ' - ' + obj['error']['info'] + '\n'));
} else if(obj['delete'] && obj['delete']['title']) {
out.appendChild(document.createTextNode(' > La pagina [[' + obj['delete']['title'] + ']] è stata cancellata\n'));
} else {
out.appendChild(document.createTextNode(' ? Unexpected response: ' + txt + '\n'));
return;
}
setTimeout('abdStart()',1000);
}
function queryString(p) {
var re = RegExp('[&?]' + p + '=([^&]*)');
var matches;
if (matches = re.exec(document.___location)) {
try {
return decodeURI(matches[1]);
} catch (e) {
}
}
return null;
}
/*</pre>
==Rimando a fondopagina==
<pre>*/
//Di [[User:Wim b]]
addPortletLink("p-personal","#footer","▼","pt-fondo","Fondopagina","",document.getElementById('pt-userpage'));
//Nuovo LiveRC
importScript('Wikipedia:Monobook.js/LiveRC/LiveRCMessages.js');
importScript('Utente:'+wgUserName+'/LiveRCparam.js');
importStylesheet('Utente:'+wgUserName+'/LiveRCparam.css');
importScriptURI("/w/index.php?title=Utente:Jalo/Sandbox&action=raw&ctype=text/javascript&dontcountme=s");
|