Utente:Kal-El/monobook.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
m Prova
Riga 1:
/* <pre><nowiki> */
 
 
/**
* Derivato dal monobook.js di [[:en:User:Wayward]], basato su [[:en:User:Alphax/monobook.js]]
* Extra tabs for monobook skin
* Necessita dell'apposito monobook.css
* Testato solo su Firefox
* Contiene codice preso dagli script di [[Utente:Paulatz]], [[Utente:Helios89]], [[Utente:Timendum]], [[Utente:Nick1915]]
* Forked from [[User:ABCD/monobook.js]] around April 2005
* Dual licensed under the GFDL and GPL
* See also: [[User:JesseW/monobook.js]]
* For italian translation [[it:Utente:Helios89/monobook.js]]
* Additional programming: [[it:Utente:Paulatz/monobook.js]]
*/
 
/** GLOBALS **/
arrayArgument = new Array("antropologia", "archeologia", "architettura", "biografie", "biologia", "calcio", "chimica", "cinema", "diritto", "economia", "filosofia", "fisica", "fumetti", "geografia", "giochi", "informatica", "ingegneria", "letteratura", "matematica", "meccanica", "medicina", "musei", "musica", "politica", "religione", "scienza", "sociologia", "sport", "storia", "teatro");
 
arrayMese = new Array("gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno",
"luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre");
 
var curTemplate;
 
/**** InitialiseInitialize on window load ****/
 
if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false);
Riga 32 ⟶ 36:
function myLoadFuncs()
{
addPurge(); // &action=purge
changeLinks(); // cause the personal menu looks bad
addPurge();
add_tabs(); // load tabs
// &section=0
addToolBoxLinks(); // add toolbox links
//addEditSection0();
addNavBarLinks(); // add navigation bar links
// cause the personal menu looks bad
talkpageplus(); // make red talk page links start new sections
changeLinks();
// because edit summaries are good
// remove the logout access key
//addForceSummary();
ta['pt-logout'] = new Array(null, null);
// if this is VFD, add the show/hide thingies
if(document.title.indexOf("Wikipedia:Pagine da cancellare") != -1 && document.title.indexOf("Editing ") != 0) vfdlinks();
// now add a million extra tabs
morelinks();
// and some stuff for the sidebar
addToolBoxLinks();
// for admins only...
// if(document.title.indexOf("Confirm delete - Delete") == 0) addVfdLink();
// change the title of the edit link
ta['ca-edit'] = ['e', 'Modifica questa pagina'];
// re-render the title and accesskeys for stuff
akeytt();
}
 
 
// Functions auxFicus and Ficus
function auxFicus(){
Argument = document.getElementById('inlinePopupDiv').getElementsByTagName('select')[0].value;
Template = curTemplate;
 
wpTextbox1 = document.getElementById("wpTextbox1");
if (TemplatecurTemplate == "W"||Template == "w")
wpTextbox1.value="{{"+TemplatecurTemplate+"|"+Argument+"|"+"{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}|~~~~}}"+wpTextbox1.value;
else {
Because = document.getElementById('inlinePopupDiv').getElementsByTagName('input')[0].value;
wpTextbox1.value="{{"+TemplatecurTemplate+"|"+Because+"|"+Argument+"|"+"{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}|~~~~}}"+wpTextbox1.value;
}
summ=document.getElementById("wpSummary");
summ.value=summ.value+"+Aiutare";
Riga 73 ⟶ 64:
 
function Ficus(Template){
arrayArgument = new Array("antropologia", "archeologia", "architettura", "biografie", "biologia", "calcio", "chimica", "cinema", "diritto", "economia", "filosofia", "fisica", "fumetti", "geografia", "giochi", "informatica", "ingegneria", "letteratura", "matematica", "meccanica", "medicina", "musei", "musica", "politica", "religione", "scienza", "sociologia", "sport", "storia", "teatro")
 
switch(Template){
case "A":
Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da aiutare\"</b>\n." +
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." +
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." +
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." +
case "w":
Greeter = "Hai richiesto di inserire questa pagina nella Categoria <b>\"Da wikificare\"</b>\n. Per favore scegli un argomento dalla lista.";
break;
default: Greeter = "Qualcosa è andato storto, fai pure quello che vuoi: non ho idea di cosa succederà"
Riga 97 ⟶ 86:
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!='w')){
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();
}
 
 
/**** ExtraMake tabthe addingtop links look better ****/
 
function changeLinks()
{
if(!document.getElementById) return;
// remove the "my" bits
document.getElementById('pt-mytalk').firstChild.innerHTML = 'discussione';
document.getElementById('pt-preferences').firstChild.innerHTML = 'preferenze';
document.getElementById('pt-watchlist').firstChild.innerHTML = 'osservati speciali';
document.getElementById('pt-mycontris').firstChild.innerHTML = 'contributi';
// add a clock
var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0];
addlilink(toplinks, '#', '', 'utcdate');
showtime();
}
 
/**** Add generic tab ****/
 
function addlilink(tabs, url, name, id){
Riga 179 ⟶ 184:
return li;
}
 
/**** Add tab as menu ****/
 
function addlimenu(tabs, name, id)
{
var na = document.createElement('a');
na.href = '#';
var mn = document.createElement('ul');
na.appendChild(document.createTextNode(name));
Riga 194 ⟶ 201:
return li;
}
 
/**** Add purge tab ****/
 
function addPurge()
Riga 204 ⟶ 213:
if(x.children) x = x.children[0];
else x = x.childNodes[0];
addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purge', 'ca-purge');
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();', 'aggiorna', 'ca-purge');
}
 
function closevfdgetParam(bold, notboldname){
if(___location.search){
{
for(var x in ___location.search.substring(1).split('&')){
var txt = document.editform.wpTextbox1;
var eq = x.indexOf('=');
txt.value = "{{subst:vt}} '''" + bold + "'''" + notbold + ". &ndash; ~~~~\n" + txt.value + "\n{{subst:vb}}\n";
if(x.substring(0, eq) == name) return x.substring(eq + 1);
txt = document.editform.wpSummary;
}
txt.value = "close discussion: " + bold + notbold;
}
document.editform.wpWatchthis.checked = false;
return '';
}
 
/**** Tools menu ****/
function editSummary()
{
var txt = document.editform.wpTextbox1;
document.editform.wpSummary.value = 'Edit summary';
if(txt.value.length > 0) txt.value += '\n';
txt.value += '{{subst:edit summary}} ~~~~';
txt.focus();
}
 
function welcomeMessagefixformat(){
var form = document.editform;
{
var txt = form.wpTextbox1;
document.editform.wpSummary.value = 'Benvenuto nella Wikipedia';
var txt.value = document.editformtxt.wpTextbox1;value
.replace(/<\/?(b|strong)>/gi, "'''")
if(txt.value.length > 0) txt.value += '\n';
.replace(/<\/?(i|em|var)>/gi, "''")
txt.value += '{{subst:User:Alphax/Welcome}} ~~~~';
.replace(/\{\{([Ss]u[bp])\|([^}]+)\}\}/g, "{{subst:$1|$2}}")
txt.focus();
.replace(/<\/div +>/gi, "</div>");
form.wpSummary.value += "formatting";
form.wpMinoredit.checked = true;
}
 
function anonWelcomereplace(){
{
document.editform.wpSummary.value = 'Create an account!';
var txt = document.editform.wpTextbox1;
if(txt.value.length > 0) txt.value += '\n';
txt.value += '{{subst:anon}} Thanks, ~~~~';
txt.focus();
}
 
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);
Riga 253 ⟶ 257:
}
 
/**** Talk message functions ****/
function vfdresult()
 
// 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;
var res = prompt("Result?");
if (t.value.length > 0)
var vfddate = prompt("Nomination date?");
if(!res)t.value return+= '\n';
t.value += msg;
document.editform.wpSummary.value = 'VFD result - ' + res.replace(/'/g, '');
f.wpSummary.value = summ;
var txt = document.editform.wpTextbox1;
f.wpWatchthis.checked = watch;
if(txt.value.length > 0) txt.value += '\n';
f.wpMinoredit.checked = minor;
txt.value += '==VFD==\nOn [[' + vfddate + ']] [[{{subst:CURRENTYEAR}}]], this article was nominated for deletion. The result was ' + res + '. See [[Wikipedia:Votes for deletion/{{subst:PAGENAME}}]] for a record of the discussion. &ndash; ~~~~';
txt.focus();
}
 
// Like the former one, but adds "msg" in the beginning
function hidevfd()
function edit_summary_watch2(msg, summ, watch, minor)
{
var divsf = document.getElementsByTagName("div")editform, t = f.wpTextbox1;
t.value = msg + '\n' + t.value;
for(var x = 0; x < divs.length; ++x)
f.wpSummary.value = summ;
if(divs[x].className.indexOf("vfd") != -1)
f.wpWatchthis.checked = watch;
divs[x].style.display = "none";
f.wpMinoredit.checked = minor;
document.getElementById('footer').style.display = 'none';
}
 
// Places perm block and name block tags at top of edit section,
function showvfd()
// marks or unmarks the "Watch this page" checkbox according to watch,
{
// and marks or unmarks the "Minor edit" checkbox
var divs = document.getElementsByTagName("div");
function perm_name_block(msg, summ, watch, minor)
for(var x = 0; x < divs.length; ++x)
{
if(divs[x].className.indexOf("vfd") != -1)
var f = document.editform, t = f.wpTextbox1;
divs[x].style.display = "";
if (t.value.length > 0)
document.getElementById('footer').style.display = '';
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;
}
 
/**** Integrate tabs and talk message functions ****/
function vfdlinks()
 
// adds various tabs and menu tabs
function add_tabs()
{
var tabs = if(!document.getElementById('p-cactions') return.getElementsByTagName('ul')[0];
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
addlilink(tabs, 'javascript:hidevfd()', 'hide closed', 'ca-hide');
ta['ca-hide'] = ['', 'Hide closed VFDs'];
addlilink(tabs, 'javascript:showvfd()', 'show closed', 'ca-show');
ta['ca-show'] = ['', 'Show closed VFDs'];
}
 
//Solo per le pagine di discussioni
function vfddelete(){
if (document.title.indexOf("Modifica di Discussioni utente:") != -1)
var form = document.forms.deleteconfirm;
{
form.wpReason.value = '[[Wikipedia:Votes for deletion/' + unescape(window.___location.href.replace(/^.*\?title=([^&]+)&action=delete.*$/, '$1').replace(/_/g, ' ')) + ']]';
addlimenu(tabs, 'Messaggi talk', 'talkm');
form.wpConfirm.checked = true;
var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0];
addlilink(talkm,'javascript:edit_summary_watch("{{subst:benve|~~~~}}", "Benvenuto", false, true)','Welcome', '');
addlilink(talkm,'javascript:edit_summary_watch("{{test}}", "test", false, true)','Test', '');
addlilink(talkm,'javascript:edit_summary_watch("{{vandalismo}}", "vandal", false, true)','Vandal', '');
addlilink(talkm,'javascript:edit_summary_watch("{{spam}}", "spam", false, true)','Spam', '');
addlilink(talkm,'javascript:edit_summary_watch("{{Avvisocopyviol|articolo=|url=}} ~~~~","avviso cv",false,true)','avviso cv','');
addlilink(talkm,'javascript:edit_summary_watch("{{Avvisocancellautente|wikilink=[[Titolo_pagina]]}}","avviso proposta 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', '');
}
}
 
/**** Add links to the toolbox ****/
function morelinks(){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(document.title.indexOf("Editing Wikipedia:Votes for deletion") == 0)
{
addlimenu(tabs, 'vfd actions', 'vfda');
var vfda = document.getElementById('vfda').getElementsByTagName('ul')[0];
addlilink(vfda, 'javascript:closevfd("keep", "")', 'keep', '');
addlilink(vfda, 'javascript:closevfd("merge and redirect", " to [[" + prompt("Merge and redirect to?") + "]]")', 'merge', '');
addlilink(vfda, 'javascript:closevfd("redirect", " to [[" + prompt("Redirect to?") + "]]")', 'redir', '');
addlilink(vfda, 'javascript:closevfd("transwiki", " to " + prompt("Transwiki to?"))', 'trans', '');
addlilink(vfda, 'javascript:closevfd("transwiki", " to Wiktionary")', 'wikt', '');
addlilink(vfda, 'javascript:closevfd("speedy delete", "")', 'speedy', '');
addlilink(vfda, 'javascript:closevfd("delete", "")', 'del', '');
addlilink(vfda, 'javascript:closevfd(prompt("Result?"), "")', 'other', '');
addlilink(tabs, 'javascript:replace()', 'replace', '');
}
else if(document.title.indexOf("Confirm delete - Delete") == 0)
{
addlilink(tabs, 'javascript:vfddelete()', 'vfd', '');
}
else if(document.title.indexOf("Editing User talk:") == 0)
{
addlilink(tabs, 'javascript:replace()', 'replace', '');
addlimenu(tabs, 'talk messages', 'talkm');
var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0];
addlilink(talkm, 'javascript:welcomeMessage()', 'welcome', '');
addlilink(talkm, 'javascript:anonWelcome()', 'anon', '');
addlilink(talkm, 'javascript:startThread()', 'thread', '');
addlilink(talkm, 'javascript:editSummary()', 'summary', '');
}
else if(document.title.indexOf("Editing ") == 0)
{
addlilink(tabs, 'javascript:replace()', 'replace', '');
addlilink(tabs, 'javascript:vfdresult()', 'vfd result', '');
}
 
 
}
 
function addToolBoxLinks()
{
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
var cur_user=document.getElementById("pt-userpage").textContent;
addlilink(tb, '/wiki/Speciale:Newpages', 'New pages', '');
addlilink(tb, '/wiki/SpecialeWikipedia:ShortpagesProposte_di_cancellazione_semplificata', 'ShortCancellazioni pagessemplificate', '');
addlilink(tb, '/wiki/SpecialeWikipedia:LogPagine_da_cancellare', 'LogsCancellazioni ordinarie', '');
addlilink(tb, 'http:/wiki/Template:Deletiontoolstools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=itwiki_p&user=' + cur_user, 'DeletionEdit toolscount', '');
username_a = document.___URL.match(/:.*:(.*)/);
addlilink(tb, '/wiki/Wikipedia:Disambiguation_pages_with_links', 'Dab list', '');
username=username_a[1];
addlilink(tb, '/wiki/Wikipedia:Template_messages/User_talk_namespace', 'Talk messages', '');
addlilink(tb, 'http:/wiki/User_talk:Alphaxtools.wikimedia.de/special~interiot/cgi-bin/count_edits?dbname=itwiki_p&user='+username, 'SpecialUser\'s edit characterscount', '');
addlilink(tb, '/wiki/WPSpeciale:ICTLog', 'Image Copyright tagsLog', '');
}
 
/**** Add links to the navigation bar ****/
// Returns <li><a href="url">name</a></li>
function addlilink(url, name)
{
var na = document.createElement('a');
na.setAttribute('href', url);
 
function addNavBarLinks()
var txt = document.createTextNode(name);
{
na.appendChild(txt);
var navbar = document.getElementById('p-navigation').getElementsByTagName('ul')[0];
var username=document.getElementById("pt-userpage").textContent;
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', 'My sandbox', '');
}
 
/**** Get a clock that autoupdates! ****/
var li = document.createElement('li');
 
li.appendChild(na);
function showtime()
return li;
{
var timerID;
var now = new Date();
var timeValue = now.toUTCString().replace(/GMT/, "UTC");
document.getElementById('utcdate').firstChild.innerHTML = timeValue;
timerID = setTimeout('showtime()', 100);
}
 
/**** Auto start new topics when hitting empty talk pages from the content page ****/
// Adds a "blocklog" tab and fills in the username field on Speciale:Blockip, if a "&faketarget=username" is present.
 
function do_blockip_stuff()
function talkpageplus()
{
var talkpagelink = document.getElementById('ca-talk');
// focus on Reason field
if (talkpagelink.className == 'new')
document.getElementsByName('wpBlockReason')[0].focus();
 
// Look for a &faketarget= for the username/ip
var l = ___location.search.substring(1).split('&');
var target = '';
for (var i = 0; i < l.length; ++i)
{
talkpagelink.firstChild.href += '&section=new';
var n = l[i].indexOf('=');
if (l[i].substring(0, n) == 'faketarget')
{
target = l[i].substring(n + 1);
break;
}
}
}
 
/**** Add "unwatch" link to watchlist ****/
if (target == '')
return;
 
addOnloadHook(function () {
// put account name in "IP Address/username" field
var query_prefix = "title=Speciale:Watchlist&action=submit&remove=1&id[]=";
var addr = document.getElementsByName('wpBlockAddress')[0];
var query_prefix = "action=unwatch&title=";
addr.value = unescape(target);
 
if (window.___location.href.indexOf("Speciale:Watchlist") == -1) return;
// add "blocklog" tab
var c1links = document.getElementById('column-onecontent').getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
if (links[i].href.substring(links[i].href.length-15) != '&action=history')
tabs.appendChild(addlilink('/w/index.php?title=Special%3ALog&type=block&user=&page=Utente%3A' + target, 'blocklog'));
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);
}
});
 
function RemoveNode(id){
var node = document.getElementById(id)
node.parentNode.removeChild(node);
}
 
//Create a blank portlet which can be filled with
// Opens the block log in the current window, and Speciale:Blockip in a popup.
//subsequent calls to addToPortlet.
// Width, height, top, and left are chosen for a 1600x1200 display.
//PARAMS:
//function blockpage_and_log(target)
//* title: Top label of the portlet
//{
//* newid: The id of the new portlet, needed to call addToPortlet
// window.open('Special_Blockip.html?foo=blarg&faketarget=' + target, 'Block', 'width=1600,height=600,top=600,left=0');
//* beforewhat: The name of an existing portlet; the new portlet is placed before it.
// document.___location.href = 'http://it.wikipedia.org/w/index.php?title=Speciale%3ALog&type=block&user=&page=Utente%3A' + target;
// If void or invalid, the portlet is added after all the other ones.
//}
function createPortlet(title, newid, beforewhat)
 
// Adds "block" and "blocklog" tabs to User: and User talk: pages.
function add_block_tab()
{
var y;
var z;
var c1f = document.getElementById('"column-one'");
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
 
var portlet = document.createElement('div');
// use the "edit this page" tab to get already-tidied url
var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
// cut everything up to "title=" from the start and everything past "&action=edit" from the end
editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit'));
editlk = editlk.substring(editlk.indexOf(':') + 1);
var slloc = editlk.indexOf('/');
if (slloc > 0)
editlk = editlk.substring(0, slloc);
 
// add "block"var tabpos;
if (beforewhat) pos = document.getElementById(beforewhat);
tabs.appendChild(addlilink('/w/index.php?title=Special%3ABlockip&faketarget=' + editlk, 'block'));
 
portlet.className = "portlet";
// To open the block page and block log simultaneously, replace the above line with:
portlet.id = newid;
// tabs.appendChild(addlilink('javascript:blockpage_and_log("' + editlk + '")', 'Block'));
y = document.createElement('h5');
// and uncomment the blockpage_and_log() function above.
y.appendChild(document.createTextNode(title));
 
portlet.appendChild(y);
// add "blocklog" tab
tabs.appendChild(addlilink('/w/index.php?title=Speciale%3ALog&type=block&user=&page=Utente%3A' + editlk, 'blocklog'));
 
y = document.createElement('div');
//add "contributions" tab
y.className= "pBody";
tabs.appendChild(addlilink('/w/wiki.phtml?title=Speciale:Contributions&target=Utente:%3A' + editlk, 'contributions'));
 
portlet.appendChild(y);
}
 
if (beforewhat) f.insertBefore(portlet, pos);
function do_onload()
else f.appendChild(portlet);
{
if (document.title.indexOf('User:') == 0
|| document.title.indexOf('User talk:') == 0)
add_block_tab();
else if (document.title.indexOf('Block user') == 0) // could stand to be more robust
do_blockip_stuff();
}
 
//Add something to a portlet.
if (window.addEventListener)
//PARAMS:
window.addEventListener("load", do_onload, false);
//* id: The id of the portlet.
else if (window.attachEvent)
//* obj: The object to be added.
window.attachEvent("onload", do_onload);
function addToPortlet(id, obj)
 
if ( document.createElement && window.addEventListener )
{
var f = document.getElementById(id);
function SoFixItInit() // pre-load, (don't want to slow down loading of article's content, though)
{
 
f = f.getElementsByTagName("div")[0];
}
f.appendChild(obj);
}
 
//Add an "allpages" button in "search" portlet
function SoFixItLoad() // post-load
function allpages_button_click(){
{
var inputs = document.getElementById("p-search").getElementsByTagName('input');
UserMenu = new PortletMenu( 'p-personal' );
var i;
PageMenu = new PortletMenu( 'p-cactions' );
for (i = 0; i < inputs.length; ++i)
NavMenu = new PortletMenu( 'p-navigation' );
if (inputs[i].type == "text")
//ToolMenu = new PortletMenu( 'p-tb' );
top.___location.href = 'http://it.wikipedia.org/wiki/Speciale:Allpages/' + inputs[i].value;
 
}
// This is inefficient and not particularly robust.
// This comes first, I want this link to come up as
// fast as possible.
//
function GetByClass( sElem, sClass )
{ var i, a2 = [], a = document.getElementsByTagName( sElem );
for ( i = 0; i < a.length; i++ )
if ( a[ i ].className == sClass )
a2.push( a[ i ] );
return a2;
}
var a, td = GetByClass( 'td', 'diff-otitle' );
if ( ( td = td[ 0 ] ) && ( a = td.getElementsByTagName( 'a' )[ 0 ] ) )
a.href = a.href + '&action=edit'; // need to change text, later
 
var userName = UserMenu.getText( 'pt-userpage' );
 
// personal (top-most) menu
//
// Func Talk Prefs Watch List Edits Kate Logs #IRC Out
//
UserMenu.setText( 'pt-mytalk' , 'le mie discussioni' );
UserMenu.setText( 'pt-preferences', 'preferenze' );
UserMenu.setText( 'pt-watchlist' , 'osservati speciali' );
UserMenu.setText( 'pt-mycontris' , 'miei contributi' );
UserMenu.setText( 'pt-logout' , 'esci' );
//
UserMenu.setHref( 'pt-mycontris',
'http://it.wikipedia.org/w/index.php?title=Speciale:Contributions&target=' +
userName + '&offset=0&limit=500' );
//
//
// it seems there is a stylesheet that makes them lowercase
//
// ok, the lowercased menu items are starting to really bug me:
//
document.getElementById( 'p-personal' ).getElementsByTagName( 'ul' )[0].style.textTransform = 'none';
//
UserMenu.insertBefore( 'pt-mycontris', 'pt-list', 'copyscape', 'http://copyscape.com/' );
UserMenu.insertBefore( 'pt-logout' , 'pt-logs', 'log',
'/w/index.php?title=Special%3ALog&user=' + userName );
UserMenu.insertBefore( 'pt-logs' , 'pt-kate', 'n° edit',
'javascript:void InlineKate( "' + userName + '" )' );
 
// article-actions menu, (the "tabs")
//
if ( PageMenu[ 'ca-history' ] ) // theory: if it has a history tab, then it's purgable
{
PageMenu.insertBefore( 'ca-history', 'ca-lastdiff', 'Ultima modifica',
PageMenu.getHref( 'ca-history' ).replace( /action=history/, 'diff=0' ) );
 
PageMenu.append( 'ca-purge', 'Purga',
PageMenu.getHref( 'ca-history' ).replace( /action=history/, 'action=purge' ) );
}
 
var x = 1;
NavMenu.append( 'n-' + x++, 'Amministratori', '/wiki/Wikipedia:Amministratori' );
NavMenu.append( 'n-' + x++, 'Log', '/wiki/Speciale:Log' );
NavMenu.append( 'n-' + x++, 'Pagine da cancellare', '/wiki/Wikipedia:Pagine_da_cancellare' );
NavMenu.append( 'n-' + x++, 'Sondaggi', '/wiki/Wikipedia:Sondaggi' );
NavMenu.append( 'n-' + x++, 'Stub', '/wiki/Categoria:Stub' );
 
 
}
 
function PortletMenu( id ) // constructor
{
this.menu = document.getElementById( id );
this.list = this.menu.getElementsByTagName( 'ul' )[ 0 ]; // bypass "<h5>Views</h5>", etc.
 
// sigh...as far as I can figure, there is empty whitespace being treated
// as TextNodes....
//
var LIs = this.list.getElementsByTagName( 'li' );
 
for ( var i = 0; i < LIs.length; i++ )
{
this[ LIs[ i ].id ] = LIs[ i ];
}
 
this.newItem = function( id, txt, url )
{ var li = document.createElement( 'li' ); li.id = id;
var a = document.createElement( 'a' ); a.href = url;
 
a.appendChild( document.createTextNode( txt ) );
li.appendChild( a );
 
this[ id ] = li; // watch this!!!
 
return li;
}
 
this.append = function( id, txt, url )
{ this.list.appendChild( this.newItem( id, txt, url ) );
}
this.insertBefore = function( old, id, txt, url )
{ this.list.insertBefore( this.newItem( id, txt, url ), this[ old ] );
}
 
// the ByTagName here is a bit annoying, but in Safari, I was picking
// up TextNodes by using this[ id ].firstChild.firstChild
//
this.getText = function( id ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data }
this.setText = function( id, txt ) { this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data = txt }
 
this.getHref = function( id ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].href }
this.setHref = function( id, url ) { this[ id ].getElementsByTagName( 'a' )[ 0 ].href = url }
// I add em as I need em....
}
 
function InlineKate( user )
{
var kate =
'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=itwiki_p&user=' + user;
 
var div = document.createElement( 'div' );
div.id = 'inlineKateDiv';
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 = 'inlineKateTop';
top.style.textAlign = 'right';
top.style.margin = '8px';
top.style.backgroundColor = '#DDDDDD';
 
var a = document.createElement( 'a' );
a.appendChild( document.createTextNode( "Go to Kate's" ) );
a.href = kate;
a.target = '_parent';
a.style.margin = '8px';
 
top.appendChild( a );
 
a = document.createElement( 'a' );
a.appendChild( document.createTextNode( 'Close' ) );
a.href = "javascript:void RemoveNode('inlineKateDiv')";
a.style.margin = '8px';
 
top.appendChild( a );
 
div.appendChild( top );
 
var iframe = document.createElement( 'iframe' );
iframe.id = 'inlineKateBot';
iframe.style.width = '400px';
iframe.style.height = '600px';
iframe.style.margin = '8px';
iframe.style.borderStyle = 'solid';
iframe.style.borderWidth = 'thin';
iframe.style.borderColor = '#000000';
iframe.src = kate;
 
div.appendChild( iframe );
 
function setup_allpages_button(){
document.body.appendChild( div );
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);
function RemoveNode( id )
{ var node = document.getElementById( id )
node.parentNode.removeChild( node );
}
 
SoFixItInit();
window.addEventListener( 'load', SoFixItLoad, false );
}
addOnloadHook(setup_allpages_button);
// Trigger generale: addLoadEvent();
 
// WikiSign
Riga 645 ⟶ 479:
for ( i=0; i < arra.length;i++ ) {
if ( arra[i].getAttribute("href") == "javascript:insertTags('--~~~~','','');" ) {
arra[i].setAttribute("href", "javascript:insertTags('~~~~ ','','');");
break;
}
Riga 653 ⟶ 487:
 
//ToolbarButton
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;
Riga 661 ⟶ 525:
var today = new Date();
var anno= today.getYear()+1900;
var tmpmese = arrayMese[today.getMonth()+1];
 
switch (tmp)
{
case 1:
var mese="gennaio"
break;
case 2:
var mese="febbraio"
break;
case 3:
var mese="marzo"
break;
case 4:
var mese="aprile"
break;
case 5:
var mese="maggio"
break;
case 6:
var mese="giugno"
break;
case 7:
var mese="luglio"
break;
case 8:
var mese="agosto"
break;
case 9:
var mese="settembre"
break;
case 10:
var mese="ottobre"
break;
case 11:
var mese="novembre"
break;
case 12:
var mese="dicembre"
break;
}
// pulsante STUB
addToolbarButton('tb-stb', 'javascript:addText("{{stub}}", "+{{stub}}", 0)',
tmp = document.createElement("a");
'http://upload.wikimedia.org/wikipedia/it/1/11/Stubber.png', '[Stub]', '{{stub}}');
tmp.id = 'tb-stb';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value="{{stub}}\\n"+wpTextbox1.value;summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{stub}}";})();';
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/1/11/Stubber.png');
imag.setAttribute('alt','[Stub]');
imag.setAttribute('title','{{stub}}');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
// pulsante FICUS-AIUTARE
addToolbarButton('tb-fic', "javascript:Ficus('A');", 'http://upload.wikimedia.org/wikipedia/it/c/c4/Pulsante-aiutare.gif',
tmp = document.createElement("a");
'[ficus]', '{{A}}iutare');
tmp.id = 'tb-fic';
tmp.href = "javascript:Ficus('A');";
//tmp.href = "javascript:void auxFicus('TestCase')";
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/c/c4/Pulsante-aiutare.gif');
imag.setAttribute('alt','[ficus]');
imag.setAttribute('title','{{A}}iutare');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante FICUS-CONTROLLARE
addToolbarButton('tb-fic', "javascript:Ficus('C');", 'http://upload.wikimedia.org/wikipedia/it/e/e2/Pulsante-controllare.gif',
tmp = document.createElement("a");
'[ficus]', '{{C}}ontrollare');
tmp.id = 'tb-fic';
tmp.href = "javascript:Ficus('C');";
//tmp.href = "javascript:void auxFicus('TestCase')";
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/e/e2/Pulsante-controllare.gif');
imag.setAttribute('alt','[ficus]');
imag.setAttribute('title','{{C}}ontrollare');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante FICUS-POV
addToolbarButton('tb-fic', "javascript:Ficus('P');", 'http://upload.wikimedia.org/wikipedia/it/a/ab/Pulsante-pov.gif',
tmp = document.createElement("a");
'[ficus]', '{{P}}OV');
tmp.id = 'tb-fic';
tmp.href = "javascript:Ficus('P');";
//tmp.href = "javascript:void auxFicus('TestCase')";
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/a/ab/Pulsante-pov.gif');
imag.setAttribute('alt','[ficus]');
imag.setAttribute('title','{{P}}OV');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante FICUS-WIKIFICARE
addToolbarButton('tb-fic', "javascript:Ficus('W');", 'http://upload.wikimedia.org/wikipedia/it/2/24/Pulsante-wikificare.gif',
tmp = document.createElement("a");
'[ficus]', '{{W}}ikificare');
tmp.id = 'tb-fic';
tmp.href = "javascript:Ficus('W');";
//tmp.href = "javascript:void auxFicus('TestCase')";
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/2/24/Pulsante-wikificare.gif');
imag.setAttribute('alt','[ficus]');
imag.setAttribute('title','{{W}}ikificare');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
// pulsante VOTO FAVOREVOLE +1
addToolbarButton('tb-piu', 'javascript:addText("*{{+1}} ~~~~","+1", 1)',
tmp = document.createElement("a");
'http://upload.wikimedia.org/wikipedia/it/f/f8/Favorevole.png', '[+1]', 'voto +1');
tmp.id = 'tb-piu';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{+1}} ~~~ ~~~~~";summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{+1}}";document.getElementById("wpMinoredit").checked=1;})();';
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/f/f8/Favorevole.png');
imag.setAttribute('alt','[+1]');
imag.setAttribute('title','voto +1');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante VOTO ASTENUTO =0
addToolbarButton('tb-uguale', 'javascript:addText("*{{0}} ~~~~","=0", 1)',
tmp = document.createElement("a");
'http://upload.wikimedia.org/wikipedia/it/a/aa/Astenuto.png', '[=1]', 'voto =0');
tmp.id = 'tb-uguale';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{0}} ~~~ ~~~~~";summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{0}}";document.getElementById("wpMinoredit").checked=1;})();';
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/a/aa/Astenuto.png');
imag.setAttribute('alt','[=0]');
imag.setAttribute('title','voto =0');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante VOTO CONTRARIO -1
addToolbarButton('tb-meno', 'javascript:addText("*{{-1}} ~~~~","-1", 1)',
tmp = document.createElement("a");
'http://upload.wikimedia.org/wikipedia/it/4/43/Contrario.png', '[-1]', 'voto -1');
tmp.id = 'tb-meno';
 
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{-1}} ~~~ ~~~~~";summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{-1}}";document.getElementById("wpMinoredit").checked=1;})();';
// pulsante CONTROLCOPY
var imag = document.createElement("img");
addToolbarButton('tb-vnd', 'javascript:addText("{{Controlcopy|firma=~~~|motivo=probabile copia di materiale già pubblicato altrove e dunque non originale}}", "+Controlcopy", 0)',
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/4/43/Contrario.png');
'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}}');
imag.setAttribute('alt','[-1]');
 
imag.setAttribute('title','voto -1');
// pulsante CANCELCOPY
tmp.appendChild(imag);
addToolbarButton('tb-vnd', 'javascript:addText("{{cancelcopy|firma=~~~|fonte=}}", "Da cancellare subito", 0)',
toolbar.appendChild(tmp);
'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("{{subst:benve|~~~~}}", "Benvenuto su it.wiki!", 0)',
'http://upload.wikimedia.org/wikipedia/it/7/74/Pulsante_benvenuto.png', '[Test]', '{{subst:benve|~~~~}}');
 
// pulsante CANCELLAZIONE SEMPLIFICATA
addToolbarButton('tb-vnd', 'javascript:addText("{{Da cancellare semplificata}}", "+cancellazione semplificata", 0)',
'http://upload.wikimedia.org/wikipedia/it/a/a5/Pulsante-cancsempl.gif', '[Canc]', '{{Da cancellare semplificata}}');
 
// 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}}", "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 TYPO
addToolbarButton('tb-vnd', 'javascript:addText(" ", "Typo", 1)',
'http://upload.wikimedia.org/wikipedia/it/9/92/Pulsante_typo.png', '[Avv]', ' ');
 
// pulsante UNVERIFIED
addToolbarButton('tb-stb', 'javascript:addText("{{Unverified}}", "+{{Unverified}}", 0)',
'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Uv]', '{{Unverified}}');
 
// pulsante CANCELLAZIONI FATTE
addToolbarButton('tb-cnc', 'javascript:addText("{{subst:canc fatte}}", "cancellazione conclusa", 0)',
'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Canc]', '{{canc fatte}}');
 
// pulsante CANCELLAZIONE RESPINTA
addToolbarButton('tb-cnc', 'javascript:addText("{{subst:CR}}~~~~", " e respinta", 0)',
'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Canc]', 'Cancellazione respinta');
 
// pulsante CANCELLAZIONE ACCETTATA
addToolbarButton('tb-cnc', 'javascript:addText("{{subst:CE|tot|fav|con}}~~~~", " e accettata", 0)',
'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Canc]', 'Cancellazione accettata');
 
// pulsante CANCELLAZIONE SENZA QUORUM
addToolbarButton('tb-cnc', 'javascript:addText("{{subst:CQ|}}~~~~", " senza raggiungimento quorum", 0)',
'http://upload.wikimedia.org/wikipedia/it/e/e8/Pulsante_unverified.png', '[Canc]', 'Cancellazione senza quorum');
 
}
 
addLoadEvent(ToolbarButton);
 
 
/* </pre> */
/**** End ****/
 
/* </nowiki></pre> */