Utente:Timendum/ToolbarButton.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Timendum (discussione | contributi)
Nessun oggetto della modifica
m funzioni deprecate
 
(6 versioni intermedie di 3 utenti non mostrate)
Riga 5:
var toolbar = null;
toolbar = document.getElementById("toolbar");
if (toolbar == null)
return;
var today = new Date();
Line 51 ⟶ 49:
}
// pulsante DA WIKIFICARE
tmp = document.createElement("a");
tmp.id = 'tb-wik';
Line 58 ⟶ 57:
imag.setAttribute('alt','[Wik]');
imag.setAttribute('title','{{wikificare}}');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante STUB
tmp = document.createElement("a");
tmp.id = 'tb-wik';
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 DA AIUTARE
tmp = document.createElement("a");
tmp.id = 'tb-aiu';
Line 71 ⟶ 82:
toolbar.appendChild(tmp);
 
// pulsante BENVENUTO
tmp = document.createElement("a");
tmp.id = 'tb-ben';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value="{{benve|nome={{PAGENAME}}|~~~ ~~~~~}}"+wpTextbox1.value;summ=document.getElementById("wpSummary");summ.value=summ.value+"Benvenuto su it.wiki!";})();';
imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/7/74/Pulsante_benvenuto.png');
imag.setAttribute('alt','[Ben]');
imag.setAttribute('title','Benvenuto su it.wiki!');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
 
// pulsante VOTO FAVOREVOLE +1
tmp = document.createElement("a");
tmp.id = 'tb-piu';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{piùsubst:+1}} ~~~ ~~~~~";summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{più+1}}";document.getElementById("wpMinoredit").checked=1;})();';
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/9f/92f8/PiuFavorevole.png');
imag.setAttribute('alt','[+1]');
imag.setAttribute('title','voto +1');
Line 81 ⟶ 104:
toolbar.appendChild(tmp);
 
// pulsante VOTO ASTENUTO =0
tmp = document.createElement("a");
tmp.id = 'tb-uguale';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{subst: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
tmp = document.createElement("a");
tmp.id = 'tb-meno';
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value=wpTextbox1.value+"*{{menosubst:-1}} ~~~ ~~~~~";summ=document.getElementById("wpSummary");summ.value=summ.value+"+{{meno-1}}";document.getElementById("wpMinoredit").checked=1;})();';
var imag = document.createElement("img");
imag.setAttribute('src','http://upload.wikimedia.org/wikipedia/it/04/0d43/MenoContrario.png');
imag.setAttribute('alt','[-1]');
imag.setAttribute('title','voto -1');
Line 91 ⟶ 126:
toolbar.appendChild(tmp);
}
addLoadEvent$( document ).ready(ToolbarButton);
// </nowiki>