New Immissions/Updates:
boundless - educate - edutalab - empatico - es-ebooks - es16 - fr16 - fsfiles - hesperian - solidaria - wikipediaforschools
- wikipediaforschoolses - wikipediaforschoolsfr - wikipediaforschoolspt - worldmap -

See also: Liber Liber - Libro Parlato - Liber Musica  - Manuzio -  Liber Liber ISO Files - Alphabetical Order - Multivolume ZIP Complete Archive - PDF Files - OGG Music Files -

PROJECT GUTENBERG HTML: Volume I - Volume II - Volume III - Volume IV - Volume V - Volume VI - Volume VII - Volume VIII - Volume IX

Ascolta ""Volevo solo fare un audiolibro"" su Spreaker.
CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Utente:Gusme/monobook.js - Wikipedia

Utente:Gusme/monobook.js

Da Wikipedia, l'enciclopedia libera.

Per un aiuto sull'uso di questa pagina vedi Aiuto:Preferenze.


Nota: dopo aver salvato, devi pulire la cache del tuo browser per vedere i cambiamenti: Mozilla: clicca su reload (oppure ctrl-r), IE / Opera: ctrl-f5, Safari: cmd-r, Konqueror ctrl-r.

/* <pre> */

// Aggiunge indirizzi nella toolbar personale
// code stolen from [[wikt:en:User:Hippietrail]]

function addTools() {
  var myprefs = document.getElementById('pt-mycontris'); 
  var newpt;
  var newa;

  newpt = document.createElement('li');
  newa = document.createElement('a');
  newa.href='/wiki/Utente:Gusme/index' ;
  newa.appendChild(document.createTextNode('→ home'));
  newpt.appendChild(newa);
  myprefs.parentNode.insertBefore(newpt, myprefs);

}

addOnloadHook(addTools);

/* </pre> */

/* <pre><nowiki> */

/**
 * 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]]
 * Forked from [[User:ABCD/monobook.js]] around April 2005
 * Dual licensed under the GFDL and GPL
 */

/** VARIABILI GLOBALI **/
arrayArgument = new Array("animanga", "antropologia", "archeologia", "architettura", "arte", "aziende", "biografie", "biologia", "calcio", "chimica", "cinema",
                "diritto", "economia", "filosofia", "fisica", "fumetti", "geografia", "giochi", "guerra", "informatica", "ingegneria",
                "letteratura", "linguistica", "matematica", "meccanica", "medicina", "musei", "musica", "politica", "psicologia", "religione", "scienza", 
                "sociologia", "sport", "storia", "teatro", "televisione", "trasporti", "videogiochi", "wrestling");

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()
{
    addPurge();        // aggiunge pulsante "purge"
    changeLinks();     // modifica il menu personale
    add_tabs();        // aggiunge i tab
    addToolBoxLinks(); // aggiunge i link nel portlet "strumenti"
    addNavBarLinks();  // aggiunge i link nel portlet "navigazione"
    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" || curTemplate== "S") 
        wpTextbox1.value="{{"+curTemplate+"|"+Argument+"|"+"{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}|~~~~}}"+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>\"Segnalazioni NPOV\"</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 l'orologio
    var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0];
    addlilink(toplinks, '#', '', 'utcdate');
    showtime();
}

/**** 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(/&lt;/g,'<')
	.replace(/&gt;/g,'>')
	.replace(/&amp;/g,'&')
	.replace(/&quot;/g,'"')
	.replace(/&agrave;/g,'à')
	.replace(/&egrave;/g,'è')
	.replace(/&eacute;/g,'é')
	.replace(/&igrave;/g,'ì')
	.replace(/&iexcl;/g,'¡')
	.replace(/&cent;/g,'¢')
	.replace(/&pound;/g,'£')
	.replace(/&yen;/g,'¥')
	.replace(/&acute;/g,"'")
	.replace(/&plusmn;/g,'±')
	.replace(/&times;/g,'×')
	.replace(/&divide;/g,'÷')
	.replace(/&micro;/g,'µ')
	.replace(/&deg;/g,'°')
	.replace(/&frac14;/g,'¼')
	.replace(/&frac12;/g,'½')
	.replace(/&frac34;/g,'¾')
	.replace(/&sup1;/g,'¹')
	.replace(/&sup2;/g,'²')
	.replace(/&sup3;/g,'³')
	.replace(/&sect;/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 "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, '/w/index.php?title=Utente:' + username + '/monobook.js&action=edit', 'monobook.js', '');   
    addlilink(tb, '/w/index.php?title=Utente:' + username + '/monobook.css&action=edit', 'monobook.css', ''); 
    addlilink(tb, '/wiki/Utente:' + username + '/Sandbox', 'Sandbox', ''); 
    addlilink(tb, '/wiki/Speciale:Log', 'Log', '');
    addlilink(tb, 'http://www.dnsstuff.com/tools/whois.ch?ip='+username,'User\'s Whois', 'Whois', '');
}

/**** Aggiunge i link in "navigazione" ****/

function addNavBarLinks()
{   
    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, '/wiki/Speciale:Log/newusers', 'Nuovi utenti', '');   
}

/**** L'orologio che si aggiorna automaticamente ****/

function showtime()
{
    var timerID;
    var now = new Date();
    var timeValue = now.toLocaleString().replace(/GMT/, "CET");
    document.getElementById('utcdate').firstChild.innerHTML = timeValue;
    timerID = setTimeout('showtime()', 100);
}

/**** 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("unwatch"));
        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-stu', "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/commons/2/2d/CE_icon.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}} [[Utente:Gusme|<b><span style="color:darkgoldenrod">G</span><span style="color:blue">u</span><span style="color:darkred">s</span><span style="color:red">m</span><span style="color:green">e</span></b>]] <sup>[[discussioni utente:Gusme|<span style="color:goldenrod; cursor:help">(Dimmi)</span>]]</sup> <small>~~~~~</small>","+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}} [[Utente:Gusme|<b><span style="color:darkgoldenrod">G</span><span style="color:blue">u</span><span style="color:darkred">s</span><span style="color:red">m</span><span style="color:green">e</span></b>]] <sup>[[discussioni utente:Gusme|<span style="color:goldenrod; cursor:help">(Dimmi)</span>]]</sup> <small>~~~~~</small>","=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}} [[Utente:Gusme|<b><span style="color:darkgoldenrod">G</span><span style="color:blue">u</span><span style="color:darkred">s</span><span style="color:red">m</span><span style="color:green">e</span></b>]] <sup>[[discussioni utente:Gusme|<span style="color:goldenrod; cursor:help">(Dimmi)</span>]]</sup> <small>~~~~~</small>","-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:Gusme/Benvenuto!|~~~~~}}", "Benvenuto su it.wiki!", 0)',
                   'http://upload.wikimedia.org/wikipedia/it/7/74/Pulsante_benvenuto.png', '[Test]', 'Benvenuto/a');

// 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 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}} ~~~~", "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 copyviol", 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 AVVISO VANDALISMO
  addToolbarButton('tb-vnd', 'javascript:addText("{{Vandalismo}}~~~~", "+Avviso vandalismo", 1)',
                   'http://upload.wikimedia.org/wikipedia/it/6/64/Wiki_vand.gif', '[Avv]', '{{Vandalismo}}');

// 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 TRASFERIMENTO
  addToolbarButton('tb-bnp', 'javascript:addText("{{trasferimento}}", "trasferimento", 0)',
                   'http://upload.wikimedia.org/wikipedia/commons/7/70/Button_fusion.png', '[Avv]', '{{trasferimento}}');

// pulsante FIRMA
  addToolbarButton('tb-gus', 'javascript:addText("--[[Utente:Gusme|<b><span style="color:darkgoldenrod">G</span><span style="color:blue">u</span><span style="color:darkred">s</span><span style="color:red">m</span><span style="color:green">e</span></b>]] <sup>[[discussioni utente:Gusme|<span style="color:goldenrod; cursor:help">(Dimmi)</span>]]</sup> <small>~~~~~</small>", "", 1)',
                   'http://upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png', '[Avv]', 'FIRMA}');    

// pulsante WIP

  addToolbarButton('tb-wip', 'javascript:addText("<noinclude>{{WIP|Gusme}}</noinclude>", "WIP", 0)', 
                   'http://upload.wikimedia.org/wikipedia/it/2/27/Pulsante_wip.png', '[Wip]', '{{WIP|Gusme}}');    
	    	  
	
}
addLoadEvent(ToolbarButton);



/***** Ricerca con Google e Yahoo *****/

// Amélioration de la page de recherche
// Auteur : Dake
// Sous licence GFDL.

function SpecialSearchEnhanced() 
{
  if (wgPageName == "Speciale:Search") {
    var mainNode = document.getElementsByTagName("form");
    if (!mainNode) return;
    
    var searchValue = document.getElementById("lsearchbox").value
    var firstForm = mainNode[0];

    var node = document.createElement('center');
    
    var googleSearch = '<FORM method=GET action="http://www.google.it/search">';
    googleSearch +=  '<TABLE bgcolor="#FFFFFF"><tr><td>';
    googleSearch += '<A HREF="http://www.google.it">';
    googleSearch += '<IMG SRC="http://www.google.com/logos/Logo_25wht.gif" border="0" '
    googleSearch += 'ALT="Google" align="absmiddle"></A> '
    googleSearch += '<INPUT TYPE=text name=q size=25 maxlength=255 value="' + searchValue + '">'
    googleSearch += '<INPUT TYPE=hidden name=hl value=it>'
    googleSearch += '<INPUT TYPE=hidden name=as_sitesearch value=it.wikipedia.org>'
    googleSearch += '<INPUT type=submit name=btnG VALUE="Cerca su it.wiki">'
    googleSearch += '</td></tr></TABLE>'
    googleSearch += '</FORM>'
    
    var yahooSearch = '<FORM method=GET action="http://it.search.yahoo.com/search">';
    yahooSearch +=  '<TABLE bgcolor="#FFFFFF"><tr><td>';
    yahooSearch += '<A HREF="http://it.yahoo.com">';
    yahooSearch += '<IMG SRC="http://us.yimg.com/i/yahootogo/y88red2.gif" alt="Yahoo!" border="0" '
    yahooSearch += 'align="absmiddle"></A> '
    yahooSearch += '<INPUT TYPE=text name=p size=25 maxlength=255 value="' + searchValue + '">'
    yahooSearch += '<INPUT TYPE=hidden name=vs value=it.wikipedia.org>'
    yahooSearch += '<INPUT type=submit name=btnG VALUE="Cerca su it.wiki">'
    yahooSearch += '</td></tr></TABLE>'
    yahooSearch += '</FORM>'

    node.innerHTML = node.innerHTML + '<div id="enhancedSearch">' + googleSearch + yahooSearch + '</div>';
        
    firstForm.parentNode.insertBefore(node, firstForm.nextSibling);
    
  }
}
     
addOnloadHook(SpecialSearchEnhanced);

/**** Fine ****/

/* </nowiki></pre> */

Static Wikipedia (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu