Utente:CristianCantoro/editcountutil.js
Questa pagina definisce alcuni parametri di aspetto e comportamento generale di tutte le pagine. Per personalizzarli vedi Aiuto:Stile utente.
Nota: dopo aver salvato è necessario pulire la cache del proprio browser per vedere i cambiamenti (per le pagine globali è comunque necessario attendere qualche minuto). Per Mozilla / Firefox / Safari: fare clic su Ricarica tenendo premuto il tasto delle maiuscole, oppure premere Ctrl-F5 o Ctrl-R (Command-R su Mac); per Chrome: premere Ctrl-Shift-R (Command-Shift-R su un Mac); per Konqueror: premere il pulsante Ricarica o il tasto F5; per Opera può essere necessario svuotare completamente la cache dal menù Strumenti → Preferenze; per Internet Explorer: mantenere premuto il tasto Ctrl mentre si preme il pulsante Aggiorna o premere Ctrl-F5.
/*
Doesn't work in IE; window.onclick doesn't fire for right clicks.
*/
topaz.editcountutil = new Object();
topaz.editcountutil.version = 20061104;
/* configuration */
// this is the page to go to instead when User: or User_talk: links are double-clicked. the
// username will be appended; therefore, the username variable should be last in the query string.
// If you keep this default value, you will also need to install Interiot's javascript edit
// counter (User:Interiot/Tool2).
topaz.editcountutil.toolurl = "http://en.wikipedia.org/wiki/User:Interiot/Tool2/code.js?username=";
/* end configuration */
topaz.editcountutil.oldonclick = document.onclick;
document.onclick = function(e) {
if (typeof topaz.editcountutil.oldonclick == "function") topaz.editcountutil.oldonclick();
var b = e ? topaz.util.mousebtnmap.ns[e.which] : topaz.util.mousebtnmap.ie[event.button];
if (b != 2) return;
var realtarg = e ? e.target : event.srcElement;
var username;
if (realtarg.nodeName.toLowerCase() != "a") realtarg = realtarg.parentNode;
if (realtarg.nodeName.toLowerCase() == "a") {
var a = realtarg.href.split("/wiki/User:");
if (!a[1]) {a = realtarg.href.split("/wiki/User_talk:");}
if (a[1]) {
var b = a[1].split("/");
username = b[0];
}
}
if (username) {
location.href = topaz.editcountutil.toolurl + username;
return false;
}
};