Utente:Genuzzu/monobook.js: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica
Nessun oggetto della modifica
 
(46 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
if (mwCustomEditButtons) {
//YEAH


mwCustomEditButtons[mwCustomEditButtons.length] = {
/* Trib plus */
"imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png",
"speedTip": "Cancellazione immediata (USARE CON CAUTELA!)",
"tagOpen": "{{Cancellazione|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui il motivo"};


mwCustomEditButtons[mwCustomEditButtons.length] = {
function tribPlusInit() {
"imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png",
var $processingArticles = $('.LightVotingTable');
"speedTip": "Articolo in scadenza",
$processingArticles.each(function() {
"tagOpen": "{{scadenza|{{subst:7g}" + "}|note=",
var forDelete = $('tr:eq(4) td:eq(0) ol li', this).length;
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
var forRestwat = $('tr:eq(4) td:eq(1) ol li', this).length;
"sampleText": "Note"};
var forSave = $('tr:eq(6) td ol li', this).length;
var total = forDelete + forRestwat + forSave;
$('tr:eq(3) td:eq(0) span b', this).append(' <i>(' + forDelete + ')</i>');
$('tr:eq(3) td:eq(1) span b', this).append(' <i>(' + forRestwat + ')</i>');
$('tr:eq(5) td span b', this).append(' <i>(' + forSave + ')</i>');
var results = $('<div></div>');
$('tr:eq(0) td', this).append(results);
results.append('<div>Cancellazione: ' + (100 * forDelete / total) + '% (67% richiesto)</div>');
results.append('<div>Restauro: ' + (100 * forRestwat / total) + '% (50% richiesto)</div>');
});
}


mwCustomEditButtons[mwCustomEditButtons.length] = {
if (wgPageName == 'Nonciclopedia:Tribunale') {
"imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png",
$(document).ready(tribPlusInit);
"speedTip": "Articolo in dubbio",
}
"tagOpen": "{{Accusa|accusa=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui l'accusa"};


mwCustomEditButtons[mwCustomEditButtons.length] = {
//NONCIO_TI_GIURO_SEI_IMPEDITO_v2.JS
"imageFile": "http://images.wikia.com/nonciclopedia/images/d/d6/E%27fiamme.png",
"speedTip": "Formattazione",
"tagOpen": "{{formattazione|",
"tagClose": "}" + "}\n\n",
"sampleText": "Inserire qui cosa fare"};

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images3.wikia.nocookie.net/nonciclopedia/images/6/6c/Button_restauro.png",
"speedTip": "Articolo da sistemare",
"tagOpen": "{{Restauro|motivo=",
"tagClose": "|firma=~~" + "~~}" + "}\n\n",
"sampleText": "Inserire qui la descrizione"};

}


disableHideEdit = true;
if(wgAction == 'edit') $(function() {location.hash = 'toolbar';});
disableaprilfish = true;
disableAlert = true;


addOnloadHook(function() {
if(!document.getElementById("toolbar")) return;
if(wgCurRevisionId)
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
else
mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
}
);


if(wgPageName == 'Nonciclopedia:Walk_of_Shame/NonNotizie/Votazioni2012/Votazioni_Flash') $(function() {
importScript((wgPageName == "Nonciclopedia:LiveRC"), "Nonciclopedia:LiveRC/LiveRC.js");
window.voteTable = {i: 0};
$('.VotingTable').each(function() {
voteTable[voteTable.i++] = { //quick hack: contatore direttamente nell'oggetto
text: $(this).find('tbody > tr:nth(0) > td > b').html(),
vote: (function($_this) {
var vote = 0;
var voteLis = $_this.find('tbody > tr:nth(3) > td > ul > li');
voteLis.each(function() {
alert(vote);
vote += parseInt($(this).html().split('+')[1].split('-')[0]);
});
return vote / parseFloat(voteLis.length); //per farlo float uso parseFloat sul divisore
})($(this))
}
});
});

Versione attuale delle 13:59, 14 dic 2013

if (mwCustomEditButtons) {

mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/nonciclopedia/images/0/0c/Button_Chuck.png",
     "speedTip": "Cancellazione immediata (USARE CON CAUTELA!)",
     "tagOpen": "{{Cancellazione|motivo=",
     "tagClose": "|firma=~~" + "~~}" + "}\n\n",
     "sampleText": "Inserire qui il motivo"};

    mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/nonciclopedia/images/a/a5/Button_Samara.png",
     "speedTip": "Articolo in scadenza",
     "tagOpen": "{{scadenza|{{subst:7g}" + "}|note=",
     "tagClose": "|firma=~~" + "~~}" + "}\n\n",
     "sampleText": "Note"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/nonciclopedia/images/9/93/Button_Jessica.png",
     "speedTip": "Articolo in dubbio",
     "tagOpen": "{{Accusa|accusa=",
     "tagClose": "|firma=~~" + "~~}" + "}\n\n",
     "sampleText": "Inserire qui l'accusa"};

mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/nonciclopedia/images/d/d6/E%27fiamme.png",
     "speedTip": "Formattazione",
     "tagOpen": "{{formattazione|",
     "tagClose": "}" + "}\n\n",
     "sampleText": "Inserire qui cosa fare"};

mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images3.wikia.nocookie.net/nonciclopedia/images/6/6c/Button_restauro.png",
     "speedTip": "Articolo da sistemare",
     "tagOpen": "{{Restauro|motivo=",
     "tagClose": "|firma=~~" + "~~}" + "}\n\n",
     "sampleText": "Inserire qui la descrizione"};

}

disableHideEdit = true;
disableaprilfish = true;
disableAlert = true;

addOnloadHook(function() {
  if(!document.getElementById("toolbar")) return;
  if(wgCurRevisionId)
    mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|' + wgCurRevisionId + '}' + '}';
   else
    mwEditButtons[9].tagOpen = '--~~' + '~~{{VF|}' + '}';
  }
);

importScript((wgPageName == "Nonciclopedia:LiveRC"), "Nonciclopedia:LiveRC/LiveRC.js");