Utente:Timendum/ToolbarButton.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m prova +1 |
m funzioni deprecate |
||
(14 versioni intermedie di 3 utenti non mostrate) | |||
Riga 5:
var toolbar = null;
toolbar = document.getElementById("toolbar");
var today = new Date();
Line 51 ⟶ 49:
}
// pulsante DA WIKIFICARE
tmp = document.createElement("a");
tmp.id = 'tb-wik';
Line 61 ⟶ 60:
toolbar.appendChild(tmp);
// pulsante STUB
tmp = document.createElement("a");
tmp.id = 'tb-
tmp.href = 'javascript:(function() {wpTextbox1=document.getElementById("wpTextbox1");wpTextbox1.value="{{
var imag = document.createElement("img");
imag.setAttribute('src','http://
imag.setAttribute('alt','[
imag.setAttribute('title','
tmp.appendChild(imag);
toolbar.appendChild(tmp);
// pulsante DA AIUTARE
tmp = document.createElement("a");
tmp.id = 'tb-aiu';
Line 78 ⟶ 79:
imag.setAttribute('alt','[Aiu]');
imag.setAttribute('title','{{da aiutare}}');
tmp.appendChild(imag);
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+"*{{subst:+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
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+"*{{subst:-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/4/43/Contrario.png');
imag.setAttribute('alt','[-1]');
imag.setAttribute('title','voto -1');
tmp.appendChild(imag);
toolbar.appendChild(tmp);
}
// </nowiki>
|