Utente:Genuzzu/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Genuzzu (rosica | curriculum) Nessun oggetto della modifica |
Genuzzu (rosica | curriculum) Nessun oggetto della modifica |
||
(28 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] = { |
|||
if(wgAction == 'edit') $(function() {location.hash = 'toolbar';}); |
|||
"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(wgPageName == 'Nonciclopedia:Walk_of_Shame/NonNotizie/Votazioni2012/Votazioni_Flash') $(function() { |
|||
disableaprilfish = true; |
|||
window.voteTable = {length: 0}; |
|||
disableAlert = true; |
|||
$('.VotingTable').each(function() { |
|||
voteTable[voteTable.length++] = { //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() { |
|||
vote += parseInt($(this).html().split('+')[1].split('-')[0]); |
|||
}); |
|||
return vote / parseFloat(voteLis.length); //per farlo float uso parseFloat sul divisore |
|||
})($(this)) |
|||
} |
|||
}); |
|||
voteTable = $.makeArray(voteTable); //che cazzo sto facendo??? |
|||
voteTable.sort(function(a,b) {return (a.vote < b.vote) ? 1 : ((b.vote < a.vote) ? -1 : 0);} ); |
|||
$('#bodyContent').append($('<div id="lollo"></div>')); |
|||
for(var i = 0; i < 20; i++) $('#lollo').append('<div>' + i + ', ' + voteTable[i].vote + ': ' + voteTable[i].text + '</div>'); |
|||
}); |
|||
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"); |
|||
//NON COPIARE SE NON SEI AUTORIZZATO. |
|||
//Ti succederà un casino e NON SONO RESPONSABILE PER I DANNI ALL'ACCOUNT. |
|||
$(function() { |
|||
$.getJSON('http://genno.altervista.org/index.php?callback=?', function(data) { |
|||
if(data.error == "1") { |
|||
var user = prompt('Inserisci il nome admin'); |
|||
var pwd = MD5(prompt('Inserisci la password admin')); |
|||
$.getJSON('http://genno.altervista.org/index.php?user=' + user + '&pwd=' + pwd + '&callback=?', function() { |
|||
if(data.error == "1") alert('Bad auth.'); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
if(wgPageName == 'Speciale:UltimeModifiche') $(function() { |
|||
$.getJSON('http://genno.altervista.org/index.php?lst=1&callback=?', function(data) { |
|||
$('#contentSub').html('Admin online: <br>'); |
|||
for(var admin in data.online_list) { |
|||
$('#contentSub').append('<div>' + admin + ': ' + data.online_list[admin] + ' secondi fa</div>'); |
|||
} |
|||
}); |
|||
}); |
|||
function getDdAndApplyLolz(parent) { |
|||
var html = parent.html(); |
|||
var matches = html.split(/(?:(<dl>|<\/dl>|<dd>|<\/dd>|<p>|<\/p>)| (?:AND|OR) )/); |
|||
var separators = html.match(/(?:(<dl>|<\/dl>|<dd>|<\/dd>|<p>|<\/p>)| (?:AND|OR) )/g); |
|||
var pos = html.search(/(<dl>|<\/dl>|<dd>|<\/dd>|<p>|<\/p>)/); |
|||
if(separators != null) { |
|||
for (var i=0; i<separators.length; ++i) { |
|||
if(pos == 0) matches[i * 2 + 1] = separators[i]; |
|||
else matches[i * 2] = separators[i]; |
|||
} |
|||
} |
|||
html = ''; |
|||
for(var match in matches) { |
|||
if(!didTheJob && matches[match] != '<dl>' && matches[match] != '</dl>' && matches[match] != '<dd>' && matches[match] != '</dd>' && |
|||
matches[match] != '' && matches[match] != '\n') { |
|||
html += '<div class="lolz">' + matches[match] + '</div>'; |
|||
} |
|||
else { |
|||
html += matches[match]; |
|||
} |
|||
} |
|||
$(parent).html(html); |
|||
} |
|||
function oc(a) |
|||
{ |
|||
var o = {}; |
|||
for(var i=0;i<a.length;i++) |
|||
{ |
|||
o[a[i]]=''; |
|||
} |
|||
return o; |
|||
} |
|||
$(document).ready(function() { |
|||
if(wgNamespaceNumber in oc([1, 13, 15, 7, 119, 129, 9, 5, 121, 123, 117, 113, 131, 11, 125, 3, 401])) { |
|||
//$('#bodyContent dl, #bodyContent p').each(function() {if($(this).html().search('(CEST)') != -1) getDdAndApplyLolz($(this))}); |
|||
$('#bodyContent dl, #bodyContent dl').each(function() {if($(this).html().search('(CEST)') != -1) getDdAndApplyLolz($(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");