User:SaoMikoto/common.js: Difference between revisions

From Test Wiki
Content deleted Content added
// Edit via InPageEdit
Tag: Reverted
// Edit via InPageEdit
Tag: Manual revert
Line 22: Line 22:
importScript('User:SaoMikoto/js/Usergroup.js'); // Backlink: [[User:SaoMikoto/js/Usergroup.js]]
importScript('User:SaoMikoto/js/Usergroup.js'); // Backlink: [[User:SaoMikoto/js/Usergroup.js]]
importScript('User:SaoMikoto/js/CleanDeleteReasons.js'); // Backlink: [[User:SaoMikoto/js/CleanDeleteReasons.js]]
importScript('User:SaoMikoto/js/CleanDeleteReasons.js'); // Backlink: [[User:SaoMikoto/js/CleanDeleteReasons.js]]


$(document).ready(function() {
var elements = ['🍀', '☘️', '🌸', '🌿'];
function createFallingElement() {
var element = $('<div class="falling-element">')
.text(elements[Math.floor(Math.random() * elements.length)])
.css({
'left': Math.random() * 100 + '%',
'animation-duration': (Math.random() * 3 + 2) + 's',
'animation-delay': Math.random() * 2 + 's'
});
$('body').append(element);
setTimeout(function() {
element.remove();
}, 8000);
}
setInterval(createFallingElement, 800);
});