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

Vai alla navigazione Vai alla ricerca
Ho rimosso indent, flash e tribplus
Nessun oggetto della modifica
(Ho rimosso indent, flash e tribplus)
Riga 1:
//YEAH
 
/* Trib plus */
 
function tribPlusInit() {
var $processingArticles = $('.LightVotingTable');
$processingArticles.each(function() {
var forDelete = $('tr:eq(4) td:eq(0) ol li', this).length;
var forRestwat = $('tr:eq(4) td:eq(1) ol li', this).length;
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>');
});
}
 
if (wgPageName == 'Nonciclopedia:Tribunale') {
$(document).ready(tribPlusInit);
}
 
//NONCIO_TI_GIURO_SEI_IMPEDITO_v2.JS
 
if(wgAction == 'edit') $(function() {location.hash = 'toolbar';});
 
 
if(wgPageName == 'Nonciclopedia:Walk_of_Shame/NonNotizie/Votazioni2012/Votazioni_Flash') $(function() {
window.voteTable = {length: 0};
$('.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>');
});
 
 
//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 = wgUserName;
//Per il me del futuro... RICORDATI CHE FAI SCHIFO
if(typeof(Storage)!=="undefined") {
if(localStorage.NonciCOPPWD != "") {
var pwd = localStorage.NonciCOPPWD;
}
else {
var pwd = localStorage.NonciCOPPWD = MD5(prompt('Inserisci la password admin')); //SUPER HACKY YEA
}
}
else {
var pwd = MD5(prompt('Inserisci la password admin'));
}
$.getJSON('http://genno.altervista.org/index.php?user=' + user + '&pwd=' + pwd + '&callback=?', function(data2) {
if(data2.error == "1") alert('Bad auth. Ricarica la pagina e inserisci i dati corretti.');
localStorage.NonciCOPPWD = "";
});
}
});
});
 
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><a href="http://nonciclopedia.wikia.com/wiki/Discussioni_utente:' + admin + '">' + admin + '</a>: ' + data.online_list[admin] + ' secondi fa</div>');
}
});
});
 
 
/************* Nuovo Stile discussioni e indentazione *****************/
function getDdAndApplyLolz(parent) {
var html = parent.html();
var matches = html.split(/(?:(<dl>|<\/dl>|<dd>|<\/dd>)| (?:AND|OR) )/);
var separators = html.match(/(?:(<dl>|<\/dl>|<dd>|<\/dd>)| (?:AND|OR) )/g);
var pos = html.search(/(<dl>|<\/dl>|<dd>|<\/dd>)/);
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(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(/\(CES?T\)/) != -1) getDdAndApplyLolz($(this))});
}
});
0

contributi

I cookie ci aiutano a fornire i nostri servizi. Utilizzando i nostri servizi, accetti il nostro utilizzo dei cookie.

Menu di navigazione