Utente:Jalo/monobook.js/test
/* */ /*
*/ /** * Derivato dal monobook.js di [[:en:User:Wayward]], basato su [[:en:User:Alphax/monobook.js]] * Necessita dell'apposito monobook.css * Testato solo su Firefox * Contiene codice preso dagli script di [[Utente:Paulatz]], [[Utente:Helios89]], [[Utente:Timendum]], [[Utente:Senpai]] * Forked from [[User:ABCD/monobook.js]] around April 2005 * Dual licensed under the GFDL and GPL */ /** VARIABILI GLOBALI **/ arrayArgument = new Array("aeronautica", "agricoltura", "allevamento", "alpinismo", "animali", "animanga", "antropologia", "antroponimi", "archeologia", "architettura", "arte", "arti divinatorie", "arti marziali", "astronomia", "atletica", "automobilismo", "aziende", "baseball", "biografie", "biologia", "blues", "botanica", "buddismo", "calcio", "canottaggio", "cattolicesimo", "chimica", "ciclismo", "cinema", "classica", "cristianesimo", "cucina", "curling", "danza", "diritto", "ebraismo", "ecologia", "economia", "editoria", "educazione", "F1", "filosofia", "fisica", "fotografia", "fumetti", "funghi", "gastronomia", "GDR", "geografia", "giochi", "golf", "guerra", "hockey", "informatica", "ingegneria", "hip hop", "jazz", "letteratura", "LGBT", "lingue", "linguistica", "matematica", "meccanica", "medicina", "metal", "motociclismo", "musei", "musica", "nautica", "neopaganesimo", "numismatica", "nuoto", "paleontologia", "pallacanestro", "pallamano", "pallanuoto", "pallavolo", "pattinaggio", "pesca sportiva", "piante", "politica", "Pokémon", "psicologia", "pugilato", "punk", "radio", "religione", "rock", "rugby", "scacchi", "scienza", "scherma", "sci", "skeleton", "sociologia", "sport", "stadi", "storia", "subacquea", "teatro", "telecomunicazioni", "televisione", "tennis", "tiro con l'arco", "trasporti", "turismo", "vela", "videogiochi", "vini", "wrestling", "zoologia"); arrayMese = new Array("gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"); var curTemplate; /**** Inizializzazione ****/ if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false); else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs); else { window.previousLoadFunction = window.onload; window.onload = function() { window.previousLoadFunction(); myLoadFuncs(); } } /**** Carica le funzioni personalizzate ****/ function myLoadFuncs() { alert("prima di addPurge"); addPurge(); // aggiunge pulsante "purge" alert("prima di changeLinks"); changeLinks(); // modifica il menu personale alert("prima di add_tabs"); add_tabs(); // aggiunge i tab alert("prima di addToolBoxLinks"); addToolBoxLinks(); // aggiunge i link nel portlet "strumenti" alert("prima di addNavBarLinks"); addNavBarLinks(); // aggiunge i link nel portlet "navigazione" alert("prima di ta"); ta['pt-logout'] = ['x', 'Logout (esci)']; //cambia l'accesskey per "logout" akeytt(); } // Functions auxFicus and Ficus function auxFicus(){ Argument = document.getElementById('inlinePopupDiv').getElementsByTagName('select')[0].value; wpTextbox1 = document.getElementById("wpTextbox1"); if (curTemplate == "W") wpTextbox1.value="{{"+curTemplate+"|"+Argument+"|"+"{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}|~~~~}}"+wpTextbox1.value; else if (curTemplate == "S") wpTextbox1.value="{{"+curTemplate+"|"+Argument+"}}"+wpTextbox1.value; else { Because = document.getElementById('inlinePopupDiv').getElementsByTagName('input')[0].value; wpTextbox1.value="{{"+curTemplate+"|"+Because+"|"+Argument+"|"+"{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}|~~~~}}"+wpTextbox1.value; } switch(curTemplate){ case "A": var summary = "+Aiutare"; break; case "C": var summary = "+Controllare"; break; case "P": var summary = "+nNPOV"; break; case "W": var summary = "+Wikificare"; break; case "S": var summary = "+Stub"; break; case "E": var summary = "+Enciclopedicità dubbia"; break; } summ=document.getElementById("wpSummary"); summ.value=summ.value+summary; RemoveNode('inlinePopupDiv'); } function Ficus(Template){ switch(Template){ case "A": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da aiutare\"</b>\n." + " Per favore scrivi una motivazione e scegli un argomento dalla lista"; break; case "C": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da controllare\"</b>\n." + " Per favore scrivi una motivazione e scegli un argomento dalla lista"; break; case "P": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Segnalazioni NPOV\"</b>\n." + " Per favore scrivi una motivazione e scegli un argomento dalla lista"; break; case "W": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da wikificare\"</b>\n." + " Per favore scegli un argomento dalla lista."; break; case "S": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Stub\"</b>\n." + " Per favore scegli un argomento dalla lista."; break; case "E": Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da verificare per enc\"</b>\n." + " Per favore scrivi una motivazione e scegli un argomento dalla lista"; break; default: Greeter = "Qualcosa è andato storto, fai pure quello che vuoi: non ho idea di cosa succederà" } curTemplate = Template; var div = document.createElement('div'); div.id = 'inlinePopupDiv'; div.style.position = 'absolute'; div.style.zIndex = 1000; div.style.left = '5px'; div.style.top = '5px'; div.style.backgroundColor = '#FFFFFF'; div.style.borderStyle = 'solid'; div.style.borderWidth = ' medium'; div.style.borderColor = '#000000'; var top = document.createElement('div'); top.id = 'inlinePopupTop'; top.style.textAlign = 'right'; top.style.margin = '8px'; top.style.backgroundColor = '#DDDDDD'; var a = document.createElement('a'); a.appendChild( document.createTextNode('Close')); a.href = "javascript:void RemoveNode('inlinePopupDiv')"; a.style.margin = '8px'; top.appendChild(a); div.appendChild(top); var greet = document.createElement('p'); greet.innerHTML = Greeter; div.appendChild(greet); var form = document.createElement('form'); form.name = "popupForm"; var p = document.createElement('p'); p.appendChild(document.createTextNode('Motivazione:')); if(Template != 'W' && Template != 'S'){ var myedit = document.createElement('input'); myedit.name = 'editReason'; myedit.type = 'text'; p.appendChild(myedit); } p.appendChild(document.createTextNode('Argomento:')); var sel = document.createElement('select'); sel.name = 'popupSelect'; sel.size = 1; var option; for (i = 0; i < arrayArgument.length; i++){ option = new Option(arrayArgument[i],' '); option.value = arrayArgument[i]; sel.options[sel.options.length] = option; } p.appendChild(sel); var button = document.createElement('input'); button.value = 'OK'; button.type = 'button'; button.setAttribute('onclick', 'auxFicus()'); p.appendChild(button); form.appendChild(p); div.appendChild(form); document.body.appendChild(div); div.getElementsByTagName('input')[0].focus(); } /**** Personalizza i link della barra personale ****/ function changeLinks() { if(!document.getElementById) return; // Modifica i link document.getElementById('pt-mytalk').firstChild.innerHTML = 'discussione'; document.getElementById('pt-preferences').firstChild.innerHTML = 'preferenze'; document.getElementById('pt-watchlist').firstChild.innerHTML = 'watchlist'; document.getElementById('pt-mycontris').firstChild.innerHTML = 'contributi'; } /**** Aggiunge un generico tab ****/ function addlilink(tabs, url, name, id){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.appendChild(na); tabs.appendChild(li); return li; } /**** Aggiunge un tab come menu ****/ function addlimenu(tabs, name, id) { var na = document.createElement('a'); na.href = '#'; var mn = document.createElement('ul'); na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.id = id; li.className = 'tabmenu'; li.appendChild(na); li.appendChild(mn); tabs.appendChild(li); return li; } /**** Aggiunge il tab "purge" ****/ function addPurge() { ta['ca-purge'] = ['g', 'Pulisci la cache']; if(!document.getElementById) return; var x = document.getElementById('ca-history'); var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if(!x) return; if(x.children) x = x.children[0]; else x = x.childNodes[0]; var pf = document.createElement('form'); pf.action = '?action=purge'; pf.method = 'POST'; pf.id = 'pf'; x.appendChild(pf); addlilink(tabs, 'javascript:document.getElementById("pf").submit();', 'purge', 'ca-purge'); akeytt(); } function getParam(name){ if(___location.search){ for(var x in ___location.search.substring(1).split('&')){ var eq = x.indexOf('='); if(x.substring(0, eq) == name) return x.substring(eq + 1); } } return ''; } /**** Menu "strumenti vari" ****/ //Sostituzioni automatiche function fixformat(){ var form = document.editform; var txt = form.wpTextbox1; txt.value = txt.value .replace(/\’/g, "'") .replace(/ '([\w\ ]+)' /g, ' "$1" ') .replace(/“/g,'"') .replace(/”/g,'"') .replace(/–/g, '-') .replace(/,,/g, ',') .replace(/ m2 /g, ' m² ') .replace(/a' /g, "à ") .replace(/([^p])o' /g, "$1ò ") .replace(/u' /g, "ù ") .replace(/i' /g, "ì ") .replace(/ anzich(è|e')/g, " anziché") .replace(/ affinch(è|e')/g, " affinché") .replace(/ bench(è|e')/g, " benché") .replace(/ cioé/g, " cioè") .replace(/ Dè /g, " De' ") .replace(/ dè /g, " de' ") .replace(/ dò/g, " do") .replace(/E' /g, "È ") .replace(/É /g, "È ") .replace(/ e' /g, " è ") .replace(/ é/g, " è") .replace(/ fà /g, " fa ") .replace(/ fè /g, " fe' ") .replace(/ Frà /g, " Fra' ") .replace(/ fù /g, " fu ") .replace(/ mò /g, " mo' ") .replace(/ nè /g, " né ") .replace(/ ne' /g, " né ") .replace(/ nonch(è|e')/g, " nonché") .replace(/ pè /g, " pe' ") .replace(/ perch(è|e')/g, " perché") .replace(/ per(ó|o') /g,' però ') .replace(/ piu' /g, " più ") .replace(/ pò/g, " po'") .replace(/ poich(è|e') /g, " poiché ") .replace(/ propio/g, " proprio") .replace(/ (puo|puo') /gi,' può ') .replace(/ quì /gi, " qui ") .replace(/ quà /gi, " qua ") .replace(/ qual'è /gi, " qual è") .replace(/ sà /gi, " sa ") .replace(/ sè /gi, " sé ") .replace(/si' /g, "sì") .replace(/ sò /g, " so ") .replace(/ sù /g, " su ") .replace(/ tr(è|e'|é) /g, " tre ") .replace(/ sucessivo /gi, " successivo ") .replace(/</g,'<') .replace(/>/g,'>') .replace(/&/g,'&') .replace(/"/g,'"') .replace(/à/g,'à') .replace(/è/g,'è') .replace(/é/g,'é') .replace(/ì/g,'ì') .replace(/¡/g,'¡') .replace(/¢/g,'¢') .replace(/£/g,'£') .replace(/¥/g,'¥') .replace(/´/g,"'") .replace(/±/g,'±') .replace(/×/g,'×') .replace(/÷/g,'÷') .replace(/µ/g,'µ') .replace(/°/g,'°') .replace(/¼/g,'¼') .replace(/½/g,'½') .replace(/¾/g,'¾') .replace(/¹/g,'¹') .replace(/²/g,'²') .replace(/³/g,'³') .replace(/§/g,'§') .replace(/<\/?(b|strong)>/gi, "'''") .replace(/<\/?(i|em|var)>/gi, "''") .replace(/<br>\n\n/g,'\n\n') .replace(/<br>/gi,'<br />') .replace(/\n<hr[ \/]*>\n/gi, '\n----\n') .replace(/ +<hr[ \/]*> +/gi, '\n----\n') .replace(/<hr ([^>\/]+?)>/gi,'<hr $1 />') .replace(/\n *<h1> *([^<]+?) *<\/h1> *\n/gi, "\n= $1 =\n") .replace(/\n *<h2> *([^<]+?) *<\/h1> *\n/gi, "\n== $1 ==\n") .replace(/\n *<h3> *([^<]+?) *<\/h1> *\n/gi, "\n=== $1 ===\n") .replace(/\n *<h4> *([^<]+?) *<\/h1> *\n/gi, "\n==== $1 ====\n") .replace(/\n *<h5> *([^<]+?) *<\/h1> *\n/gi, "\n===== $1 =====\n") .replace(/\n *<h6> *([^<]+?) *<\/h1> *\n/gi, "\n====== $1 =======\n") ; form.wpSummary.value += "formattazione"; form.wpMinoredit.checked = true; } //Cerca e sostituisci function replace(){ var s = prompt("Search regexp?"); if(s){ var r = prompt("Replace regexp?"); if(!r && r != '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "g"), r); } } /**** Funzioni per le pagine di discussione ****/ // Appends msg to the currently editted page, sets the summary to summ, // marks or unmarks the "Watch this page" checkbox according to watch, // and marks or unmarks the "Minor edit" checkbox function edit_summary_watch(msg, summ, watch, minor) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += msg; f.wpSummary.value = summ; f.wpWatchthis.checked = watch; f.wpMinoredit.checked = minor; } // Like the former one, but adds "msg" in the beginning and not after the end function edit_summary_watch2(msg, summ, watch, minor) { var f = document.editform, t = f.wpTextbox1; t.value = msg + '\n' + t.value; f.wpSummary.value = summ; f.wpWatchthis.checked = watch; f.wpMinoredit.checked = minor; } // Places perm block and name block tags at top of edit section, // marks or unmarks the "Watch this page" checkbox according to watch, // and marks or unmarks the "Minor edit" checkbox function perm_name_block(msg, summ, watch, minor) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; var temp = t.value; t.value = msg + '\n\n' + temp; f.wpSummary.value = summ; f.wpWatchthis.checked = watch; f.wpMinoredit.checked = minor; } /**** Aggiunge i tab e i menu ****/ // adds various tabs and menu tabs function add_tabs() { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; //Solo per le pagine di discussioni degli utenti if((document.title.indexOf("Modifica") != -1) && (document.title.indexOf("Discussioni utente") != -1)) { addlimenu(tabs, 'Messaggi talk', 'talkm'); var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0]; addlilink(talkm,'javascript:edit_summary_watch("{{subst:benve|~~~~}}", "Benvenuto", false, true)','welcome', 'pb-welcome'); ta['pb-welcome'] = new Array('b', 'Da il benvenuto'); addlilink(talkm,'javascript:edit_summary_watch("{{test}} ~~~~", "test", false, true)','Test', ''); addlilink(talkm,'javascript:edit_summary_watch("{{vandalismo}} ~~~~", "Avviso vandalismo", false, true)','Vandal', ''); addlilink(talkm,'javascript:edit_summary_watch("{{spam}}", "spam", false, true)','Spam', ''); addlilink(talkm,'javascript:edit_summary_watch("{{Avvisocopyviol|articolo=|url=}} ~~~~","avviso violazione di copyright",false,true)','avviso cv',''); addlilink(talkm,'javascript:edit_summary_watch("{{Avvisocancellautente|wikilink=[[Titolo_pagina]]}} ~~~~","avviso proposta di cancellazione",false,true)','avviso canc',''); } else if (document.title.indexOf("Modifica") != -1) // Solo durante le modifiche { addlimenu(tabs, 'strumenti vari', 'tools'); var tools = document.getElementById('tools').getElementsByTagName('ul')[0]; addlilink(tools,'javascript:fixformat()','format', ''); addlilink(tools,'javascript:replace()','replace', ''); addlilink(tools,'javascript:edit_summary_watch2("{{cancella subito|motivo=}}", "cancimm", false, true)','cancimm', ''); addlilink(tools,'javascript:edit_summary_watch2("{{cancelcopy|firma=~~~|fonte=}}", "cancelcopy", false, true)','cancelcopy', ''); addlilink(tools,'javascript:edit_summary_watch2("{{da cancellare}}", "cancellare", false, true)','da cancellare', ''); } } /**** Aggiunge i link in "navigazione" ****/ function addNavBarLinks() { alert("in"); var navbar = document.getElementById('p-navigation').getElementsByTagName('ul')[0]; var username=document.getElementById("pt-userpage").textContent; addlilink(navbar, '/wiki/Speciale:Newpages', 'Pagine nuove', ''); addlilink(navbar, '/w/index.php?title=Utente:' + username + '/monobook.js&action=edit', 'monobook.js', ''); addlilink(navbar, '/w/index.php?title=Utente:' + username + '/monobook.css&action=edit', 'monobook.css', ''); addlilink(navbar, '/wiki/Utente:' + username + '/Sandbox', 'Sandbox', ''); addlilink(navbar, '/wiki/Speciale:Ipblocklist', 'Block Log', ''); addlilink(navbar, '/wiki/Categoria:Da_cancellare_subito', 'Cancella subito', ''); addlilink(navbar, '/wiki/Speciale:Log', 'Log', ''); addlilink(navbar, 'http://it.wikipedia.org/w/index.php?title=Speciale%3ALog&type=newusers&user=&page=', 'Nuovi Utenti', ''); addlilink(navbar, '/wiki/Wikipedia:Pagine_da_cancellare', 'Pagine da cancellare', ''); addlilink(navbar, '/wiki/Categoria:Stub', 'Stub', ''); addlilink(navbar, '/wiki/Utente:Senpai/strumenti_admin', 'Strumenti Admin', ''); addlilink(navbar, '/wiki/Wikipedia:Utenti problematici', 'Utenti problematici', ''); addlilink(navbar, '/wiki/Wikipedia:Autorizzazioni_ottenute', 'Autorizzazione ottenute', ''); addlilink(navbar, '/wiki/Wikipedia:Vandalismi_in_corso', 'Vandalismi in corso', ''); alert("out"); } /**** Aggiunge i link in "strumenti" ****/ function addToolBoxLinks() { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; var cur_user=document.getElementById("pt-userpage").textContent; addlilink(tb, 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=itwiki_p&user=' + cur_user, 'Edit count', ''); username_a = document.___URL.match(/:.*:(.*)/); username=username_a[1]; addlilink(tb, '/wiki/Speciale:Log', 'Log', ''); addlilink(tb, 'http://www.dnsstuff.com/tools/whois.ch?ip='+username,'User\'s Whois', 'Whois', ''); addlilink(tb, 'http://it.wikipedia.org/wiki/Speciale:Newpages', 'Pagine nuove', ''); } /**** Aggiunge il link "unwatch" nella watchlist ****/ addOnloadHook(function () { var query_prefix = "title=Speciale:Watchlist&action=submit&remove=1&id[]="; var query_prefix = "action=unwatch&title="; if (window.___location.href.indexOf("Speciale:Watchlist") == -1) return; var links = document.getElementById('content').getElementsByTagName('a'); for (var i = 0; i < links.length; i++) { if (links[i].href.substring(links[i].href.length-15) != '&action=history') continue; var unwatch = document.createElement('a'); unwatch.href = "/w/index.php?" + query_prefix + encodeURIComponent(links[i].title); unwatch.title = "Unwatch "+links[i].title; unwatch.appendChild(document.createTextNode("non seguire")); links[i].parentNode.insertBefore(unwatch, links[i].nextSibling); // kluge to handle case where "diff" is unlinked: var delim = links[i].previousSibling; delim = (delim.nodeType == 3 ? delim.nodeValue : ""); links[i].parentNode.insertBefore(document.createTextNode(delim.replace(/^.*diff/, "")), unwatch); } }); /**** Funzioni varie ****/ //Elimina un Node function RemoveNode(id){ var node = document.getElementById(id) node.parentNode.removeChild(node); } //Crea un portlet vuoto che può essere riempito con //le successive chiamate a AddToPortlet. //PARAMS: //* title: Top label of the portlet //* newid: The id of the new portlet, needed to call addToPortlet //* beforewhat: The name of an existing portlet; the new portlet is placed before it. // If void or invalid, the portlet is added after all the other ones. function createPortlet(title, newid, beforewhat) { var y; var z; var f = document.getElementById("column-one"); var portlet = document.createElement('div'); var pos; if (beforewhat) pos = document.getElementById(beforewhat); portlet.className = "portlet"; portlet.id = newid; y = document.createElement('h5'); y.appendChild(document.createTextNode(title)); portlet.appendChild(y); y = document.createElement('div'); y.className= "pBody"; portlet.appendChild(y); if (beforewhat) f.insertBefore(portlet, pos); else f.appendChild(portlet); } //Aggiunge qualcosa ad un portlet. //PARAMS: //* id: The id of the portlet. //* obj: The object to be added. function addToPortlet(id, obj) { var f = document.getElementById(id); f = f.getElementsByTagName("div")[0]; f.appendChild(obj); } /**** Aggiunge il pulsante "Allpages" nel portlet "ricerca" ****/ function allpages_button_click(){ var inputs = document.getElementById("p-search").getElementsByTagName('input'); var i; for (i = 0; i < inputs.length; ++i) if (inputs[i].type == "text") top.___location.href = 'http://it.wikipedia.org/wiki/Speciale:Allpages/' + inputs[i].value; } function setup_allpages_button(){ var button = document.createElement('input'); button.type = "button"; button.value = "Allpages"; button.setAttribute('onClick', 'allpages_button_click()'); addToPortlet("p-search", document.createElement("hr")); addToPortlet("p-search", button); } addOnloadHook(setup_allpages_button); /**** Personalizzazione della ToolBar ****/ function addToolbarButton(id, href, src, alt, title) { var toolbar = document.getElementById("toolbar"); var today = new Date(); var anno= today.getYear()+1900; var mese = arrayMese[today.getMonth()]; var tmp = document.createElement("a"); tmp.id = id; tmp.href = href; var imag = document.createElement("img"); imag.setAttribute('src', src); imag.setAttribute('alt', alt); imag.setAttribute('title', title); tmp.appendChild(imag); toolbar.appendChild(tmp); } function addText(text, summary, n) { wpTextbox1=document.getElementById("wpTextbox1"); if (n == 0) wpTextbox1.value=text + "\n" +wpTextbox1.value; else wpTextbox1.value=wpTextbox1.value + text; summ=document.getElementById("wpSummary"); summ.value=summ.value+summary; document.getElementById("wpMinoredit").checked=1 } function ToolbarButton() { var toolbar = null; toolbar = document.getElementById("toolbar"); if (toolbar == null) return; var today = new Date(); var anno= today.getYear()+1900; var mese = arrayMese[today.getMonth()]; // pulsante FICUS-AIUTARE addToolbarButton('tb-fic', "javascript:Ficus('A');", 'http://upload.wikimedia.org/wikipedia/it/c/c4/Pulsante-aiutare.gif', '[ficus]', '{{A}}iutare'); // pulsante FICUS-CONTROLLARE addToolbarButton('tb-fic', "javascript:Ficus('C');", 'http://upload.wikimedia.org/wikipedia/it/e/e2/Pulsante-controllare.gif', '[ficus]', '{{C}}ontrollare'); // pulsante FICUS-POV addToolbarButton('tb-fic', "javascript:Ficus('P');", 'http://upload.wikimedia.org/wikipedia/it/a/ab/Pulsante-pov.gif', '[ficus]', '{{P}}OV'); // pulsante FICUS-WIKIFICARE addToolbarButton('tb-fic', "javascript:Ficus('W');", 'http://upload.wikimedia.org/wikipedia/it/2/24/Pulsante-wikificare.gif', '[ficus]', '{{W}}ikificare'); // pulsante FICUS-STUB addToolbarButton('tb-fic', "javascript:Ficus('S');", 'http://upload.wikimedia.org/wikipedia/it/1/11/Stubber.png', '[ficus]', '{{S}}tub'); // pulsante FICUS-ENCICLOPEDICITà-DUBBIA addToolbarButton('tb-fic', "javascript:Ficus('E');", 'http://upload.wikimedia.org/wikipedia/it/5/5b/Pulsante_enciclop.png', '[ficus]', '{{E}}enciclopedicità dubbia'); // pulsante TRADURRE addToolbarButton('tb-tra', 'javascript:addText("{{T|lingua=xxx|argomento=xxx|data={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}", "Da tradurre", 0)', 'http://upload.wikimedia.org/wikipedia/commons/e/eb/Button_templatelink.png', '[Tra]', '{{T|lingua=xxx|argomento=xxx|data={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}'); // pulsante VOTO FAVOREVOLE +1 addToolbarButton('tb-piu', 'javascript:addText("*{{+1}} ~~~~","+1", 1)', 'http://upload.wikimedia.org/wikipedia/it/f/f8/Favorevole.png', '[+1]', 'voto +1'); // pulsante VOTO ASTENUTO =0 addToolbarButton('tb-uguale', 'javascript:addText("*{{0}} ~~~~","=0", 1)', 'http://upload.wikimedia.org/wikipedia/it/a/aa/Astenuto.png', '[=1]', 'voto =0'); // pulsante VOTO CONTRARIO -1 addToolbarButton('tb-meno', 'javascript:addText("*{{-1}} ~~~~","-1", 1)', 'http://upload.wikimedia.org/wikipedia/it/4/43/Contrario.png', '[-1]', 'voto -1'); // pulsante CONTROLCOPY addToolbarButton('tb-vnd', 'javascript:addText("{{Controlcopy|firma=~~~|motivo=probabile copia di materiale già pubblicato altrove e dunque non originale}}", "+Controlcopy", 0)', 'http://upload.wikimedia.org/wikipedia/it/7/75/Wiki_c_copy.gif', '[Vnd]', '{{Controlcopy|firma=~~~|motivo=probabile copia di materiale già pubblicato altrove e dunque non originale}}'); // pulsante CANCELCOPY addToolbarButton('tb-vnd', 'javascript:addText("{{cancelcopy|firma=~~~|fonte=}}", "Da cancellare subito", 0)', 'http://upload.wikimedia.org/wikipedia/it/1/15/Pulsante-canccopy.png', '[Vnd]', '{{cancelcopy|firma=~~~|fonte=}}'); // pulsante CATEGORIZZARE addToolbarButton('tb-stb', 'javascript:addText("{{Categorizzare}}", "+{{Categorizzare}}", 1)', 'http://upload.wikimedia.org/wikipedia/it/5/55/Pulsante-categorizzare.gif', '[Cat]', '{{Categorizzare}}'); // pulsante TEST addToolbarButton('tb-vnd', 'javascript:addText("{{test}}~~~~", "+{{test}}", 0)', 'http://upload.wikimedia.org/wikipedia/it/4/40/Wiki_test.GIF', '[Test]', '{{test}}'); // pulsante BENVENUTO addToolbarButton('tb-vnd', 'javascript:addText("{{utente:Wim_b/benv}}--~~~", "Benvenuto su it.wiki!", 0)', 'http://upload.wikimedia.org/wikipedia/it/7/74/Pulsante_benvenuto.png', '[Test]', '{{benve|nome={{PAGENAME}}|~~~ ~~~~~}}'); // pulsante CANCELLAZIONE addToolbarButton('tb-vnd', 'javascript:addText("{{Da cancellare}}", "+cancellazione", 0)', 'http://upload.wikimedia.org/wikipedia/it/a/a5/Pulsante-cancsempl.gif', '[Canc]', '{{Da cancellare}}'); // pulsante CANCELLA UTENTE addToolbarButton('tb-vnd', 'javascript:addText("{{Avvisocancellautente|wikilink=[[Titolo_pagina]]}} ~~~~", "+Avviso cancellazione utente", 1)', 'http://upload.wikimedia.org/wikipedia/it/0/00/Pulsante-cancut.png', '[Canc]', '{{Avvisocancellautente|wikilink=[[Titolo_pagina]]}}'); // pulsante CANCELLAZIONE IMMEDIATA addToolbarButton('tb-vnd', 'javascript:addText("{{Cancella subito}}", "Da cancellare subito", 0)', 'http://upload.wikimedia.org/wikipedia/it/8/8f/Pulsante-cancimm.png', '[Canc]', '{{Cancella subito}}'); // pulsante COPYVIOL addToolbarButton('tb-vnd', 'javascript:addText("{{ViolazioneCopyright|url=indirizzo_web_del_sito}}~~~~", "Avviso violazione di copyright", 0)', 'http://upload.wikimedia.org/wikipedia/it/5/52/Pulsante_copyviol.png', '[Avv]', 'Avviso violazione di copyright'); // pulsante COPYVIOL addToolbarButton('tb-vnd', 'javascript:addText("{{ViolazioneCopyright|url=indirizzo_web_del_sito}} ~~~~", "violazione di copyright", 0)', 'http://upload.wikimedia.org/wikipedia/it/5/52/Pulsante_copyviol.png', '[Avv]', '{{ViolazioneCopyright|url=indirizzo_web_del_sito}}'); // pulsante AVVISO COPYVIOL addToolbarButton('tb-vnd', 'javascript:addText("{{Avvisocopyviol|articolo=Nome della voce|url=Fonte da cui proviene il testo}}~~~~", "+Avviso violazione di copyright", 1)', 'http://upload.wikimedia.org/wikipedia/it/e/ef/Pulsante_avvcopy.png', '[Avv]', '{{Avvisocopyviol|articolo=Nome della voce|url=Fonte da cui proviene il testo}} ~~~~'); // pulsante CARTELLINO GIALLO addToolbarButton('tb-yc', 'javascript:addText("{{yc}}", "cartellino giallo", 1)', 'http://upload.wikimedia.org/wikipedia/commons/c/cc/Bouton_Vandale2.png', '[Avv]', '{{cartellino giallo}}'); // pulsante CARTELLINO ROSSO addToolbarButton('tb-rc', 'javascript:addText("{{rc|tempo del blocco}}", "cartellino rosso", 1)', 'http://upload.wikimedia.org/wikipedia/commons/e/e4/Bouton_Vandale3.png', '[Avv]', '{{cartellino rosso}}'); // pulsante AVVISO SPAM addToolbarButton('tb-vnd', 'javascript:addText("{{Spam}}~~~~", "Avviso spam", 1)', 'http://upload.wikimedia.org/wikipedia/it/c/cb/Pulsante_spam.png', '[Avv]', '{{Spam}}'); // pulsante AVVISO DAUNIRE addToolbarButton('tb-vnd', 'javascript:addText("{{Da unire|pagina da unire}}", "Da unire", 0)', 'http://upload.wikimedia.org/wikipedia/it/e/eb/Pulsante_unire.png', '[Avv]', '{{Da unire|pagina da unire}}'); // pulsante BLOCCO PARZIALE addToolbarButton('tb-bpa', 'javascript:addText("{{Avvisobloccoparziale}}", "Blocco parziale", 0)', 'http://upload.wikimedia.org/wikipedia/it/a/ac/Pulsante_bloccoparz.png', '[Avv]', '{{Avvisobloccoparziale}}'); // pulsante BLOCCO TOTALE EDIT WAR addToolbarButton('tb-bew', 'javascript:addText("{{Avvisoeditwar}}", "Blocco totale edit war", 0)', 'http://upload.wikimedia.org/wikipedia/it/9/90/Pulsante_editwar.png', '[Avv]', '{{Avvisoeditwar}}'); // pulsante BLOCCO TOTALE NPOV addToolbarButton('tb-bnp', 'javascript:addText("{{AvvisobloccoNPOV}}", "Blocco totale edit war", 0)', 'http://upload.wikimedia.org/wikipedia/it/8/8f/Pulsante_nPOV.png', '[Avv]', '{{AvvisobloccoNPOV}}'); // pulsante TRASFERIMENTO addToolbarButton('tb-bnp', 'javascript:addText("{{trasferimento}}", "trasferimento", 0)', 'http://upload.wikimedia.org/wikipedia/commons/7/70/Button_fusion.png', '[Avv]', '{{trasferimento}}'); // pulsante ORFANA addToolbarButton('tb-orf', 'javascript:addText("{{O}}", "orfana", 0)', 'http://upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png', '[Avv]', '{{orfana}}'); // pulsante WIP addToolbarButton('tb-wip', 'javascript:addText("<noinclude>{{WIP|Wim b}}</noinclude>", "WIP", 0)', 'http://upload.wikimedia.org/wikipedia/it/2/27/Pulsante_wip.png', '[Wip]', '{{WIP|Wim b}}'); // pulsante DA CORREGGERE addToolbarButton('tb-vnd', 'javascript:addText("{{da correggere}}", "{{da correggere}}", 0)', 'http://upload.wikimedia.org/wikipedia/commons/d/d9/Button_uncorrect.png', '[Avv]', '{{da correggere}}'); // pulsante AVVISO IMMAGINE addToolbarButton('tb-aim', 'javascript:addText("{{subst:Avvisoimmagine|immagine=[[:Immagine:]]}}~~~~", "Avviso Copyright immagini", 0)', 'http://upload.wikimedia.org/wikipedia/it/a/a5/Pulsante_avviso_licenza_immagine.png', '[AI]', '{{Avvisoimmagine}}'); // pulsante UNVERIFIED addToolbarButton('tb-unv', 'javascript:addText("{{Unverified}}", "Unverified", 0)', 'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Uv]', '{{Unverified}}'); // pulsante DATE PERSONALI addToolbarButton('tb-dpe', 'javascript:addText("{{date personali}}~~~", "date personali", 1)', 'http://upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png', '[Dp]', '{{date personali}}'); // pulsante GRAZIE addToolbarButton('tb-gra', 'javascript:addText("{{grazie}} ~~~", "grazie", 1)', 'http://upload.wikimedia.org/wikipedia/it/2/23/Pulsante_grazie.png', '[Gr]', '{{grazie}}'); // pulsante NOTA DISAMBIGUA addToolbarButton('tb-ndi', 'javascript:addText("{{nota disambigua|indicare il motivo della disambigua|[[link alla voce alternativa]]}}", "nota disambigua", 0)', 'http://upload.wikimedia.org/wikipedia/it/8/8d/Nota_dis.png', '[Nd]', '{{nota disambigua}}'); // pulsante DISAMBIGUA addToolbarButton('tb-dis', 'javascript:addText("{{disambigua}}", "disambigua", 0)', 'http://upload.wikimedia.org/wikipedia/commons/b/b0/Button_category02.png', '[Di]', '{{disambigua}}'); // pulsante VEDI ANCHE addToolbarButton('tb-van', 'javascript:addText("{{vedi anche|[[titolo della voce]]}}", "vedi anche", 0)', 'http://upload.wikimedia.org/wikipedia/commons/1/12/Button_find.png', '[va]', '{{vedi anche}}'); // pulsante GALLERIA addToolbarButton('tb-gal', 'javascript:addText("<gallery></gallery>", "galleria immagini", 1)', 'http://upload.wikimedia.org/wikipedia/commons/9/9e/Btn_toolbar_gallery.png', '[ga]', 'galleria immagini'); // pulsante REFERENCES addToolbarButton('tb-gal', 'javascript:addText("<ref></ref>", "ref", 1)', 'http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png', '[RF]', 'ref'); // pulsante INTERPROGETTO addToolbarButton('tb-van', 'javascript:addText("{{interprogetto|nome del progetto=nome pagina}}", "interprogetto", 1)', 'http://upload.wikimedia.org/wikipedia/commons/6/63/Button_out_relevancy.png', '[in]', '{{interpprogetto}}'); } addLoadEvent(ToolbarButton); /**** Fine ****/ /*
*/
// script "recent Senpaio" ver. 1.0 // Vedi Utente:Senpai/monobook/recent2.js, derivato dall'Anti-vandal tool di en:user:Lupin; tradotto ed adattato da Utente:Senpai e Utente:Valepert // document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Senpai/monobook/recent2.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //
document.write('<script type="text/javascript" src="'
+ 'http://it.wikipedia.org/w/index.php?title=Utente:Emc2/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>');
// script "Catwatch" ver. 1.0 // Vedi Utente:Jalo/Catwatch.js // document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Jalo/Catwatch.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // //Mostra i Tatoo document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Wim_b/Tatoo&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/*
*/ // Aggiunge indirizzi nella toolbar personale // code stolen from [[wikt:en:User:Hippietrail]] function addTools() { var myprefs = document.getElementById('pt-mycontris'); var newpt; var newa; var username = document.getElementById('pt-userpage').getElementsByTagName('a')[0].innerHTML; newpt = document.createElement('li'); newa = document.createElement('a'); newa.href='/wiki/Utente:Wim_b/codici_utili' ; newa.appendChild(document.createTextNode('Codici utili')); newpt.appendChild(newa); myprefs.parentNode.insertBefore(newpt, myprefs); } addOnloadHook(addTools); /*
*/
// // La parte di script per l'estensione del box strumenti è opera di [[Utente:Timendum]] // (un sentito ringraziamento) :-) function morelinks() { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs); var boxclone = document.createElement("div"); boxclone.id = 'p-navclone'; boxclone.setAttribute("class","portlet"); var titolo = document.createElement("h5"); titolo.innerHTML = "strumenti extra"; boxclone.appendChild(titolo); var corpo = document.createElement("div"); corpo.setAttribute("class","pBody"); var list_ul = document.createElement("ul"); var list_a = document.createElement("li"); list_a.id = 'v-sandbox2'; var link_a = document.createElement("a"); link_a.href = '/wiki/Utente:Wim_b/sandbox2'; link_a.innerHTML = 'Seconda Sandbox'; list_a.appendChild(link_a); list_ul.appendChild(list_a); var list_b = document.createElement("li"); list_b.id = 'v-tabelle'; var link_b = document.createElement("a"); link_b.href = '/wiki/Wikipedia:Come_usare_le_tabelle'; link_b.innerHTML = 'Markup tabelle'; list_b.appendChild(link_b); list_ul.appendChild(list_b); var list_c = document.createElement("li"); list_c.id = 'v-makeup'; var link_c = document.createElement("a"); link_c.href = '/wiki/Aiuto:Markup_immagini'; link_c.innerHTML = 'Markup immagini'; list_c.appendChild(link_c); list_ul.appendChild(list_c); var list_d = document.createElement("li"); list_d.id = 'v-tex'; var link_d = document.createElement("a"); link_d.href = '/wiki/Wikipedia:Formule_matematiche_TeX'; link_d.innerHTML = 'Markup formule matemetiche TeX'; list_d.appendChild(link_d); list_ul.appendChild(list_d); var list_e = document.createElement("li"); list_e.id = 'v-colori'; var link_e = document.createElement("a"); link_e.href = '/wiki/Aiuto:Colori'; link_e.innerHTML = 'Codici dei colori'; list_e.appendChild(link_e); list_ul.appendChild(list_e); var list_f = document.createElement("li"); list_f.id = 'v-Markup'; var link_f = document.createElement("a"); link_f.href = '/wiki/Aiuto:Manuale#Il_markup_per_i_pi.C3.B9_esperti'; link_f.innerHTML = 'Markup per i più esperti'; list_f.appendChild(link_f); list_ul.appendChild(list_f); var list_g = document.createElement("li"); list_g.id = 'v-Alpinismo'; var link_g = document.createElement("a"); link_g.href = '/wiki/Progetto:alpinismo'; link_g.innerHTML = 'Progetto alpinismo'; list_g.appendChild(link_g); list_ul.appendChild(list_g); var list_h = document.createElement("li"); list_h.id = 'v-Wikibooks'; var link_h = document.createElement("a"); link_h.href = 'http://it.wikibooks.org/wiki/Pagina_principale'; link_h.innerHTML = 'Wikibooks'; list_h.appendChild(link_h); list_ul.appendChild(list_h); var list_i = document.createElement("li"); list_i.id = 'v-Wikiquote'; var link_i = document.createElement("a"); link_i.href = 'http://it.wikiquote.org/wiki/Pagina_principale'; link_i.innerHTML = 'Wikiquote'; list_i.appendChild(link_i); list_ul.appendChild(list_i); var list_l = document.createElement("li"); list_l.id = 'v-Commons'; var link_l = document.createElement("a"); link_l.href = 'http://commons.wikimedia.org/wiki/Main_Page'; link_l.innerHTML = 'Commons'; list_l.appendChild(link_l); list_ul.appendChild(list_l); corpo.appendChild(list_ul); boxclone.appendChild(corpo); document.getElementById("column-one").appendChild(boxclone); } /* if (window.addEventListener) window.addEventListener("load",morelinks,false); else if (window.attachEvent) window.attachEvent("onload",morelinks); */ addLoadEvent(morelinks); //Mostra i Tatoo document.writeln('<script type="text/javascript" src="/w/index.php?title=Utente:Wim_b/Tatoo&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //