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

nessun oggetto della modifica
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 878:
}
});
 
function progressNeve() {
$('.papocchioneve').each(function() {
t = $(this);
if(t.css("top").replace('px', '') < w.height() - 25) {
t.css("top", parseInt(t.css("top").replace('px', '')) + 5 + 'px');
}
else t.css("top", w.height() - 25);
})
for(i = -1; i < w.width(); i++) {
if(Math.floor(Math.random() * 16000) == 50) {
$(document.body).append($(document.createElement('img')).attr('class', 'papocchioneve').attr('src', arrNeveCadente[Math.floor(Math.random()*arrNeveCadente.length)]).attr('style', 'top: -25px; left: ' + i + 'px; z-index: ' + lastZIndex + ';'));
lastZIndex++;
}
}
if($('.papocchioneve').lenght > 100) $('.papocchioneve:first').remove();
}
addOnloadHook(function() {
window.w = $(window);
window.lastZIndex = 10000;
window.arrNeveCadente = new Array('http://images4.wikia.nocookie.net/__cb20111220155233/nonciclopedia/images/1/1b/Cucchiaio_di_legno_immagine_piccola.png', 'http://images1.wikia.nocookie.net/__cb20111220154715/nonciclopedia/images/a/a7/Fiocco_di_neve_piccolo.png', 'http://images4.wikia.nocookie.net/__cb20111220151347/nonciclopedia/images/9/9f/Papocchio_piccolo_29x25.png');
})
addOnloadHook(function(){setInterval(progressNeve, 37);});