MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 19: Line 19:
e.style.rotate = `${ rand(-3, 3) }deg`
e.style.rotate = `${ rand(-3, 3) }deg`
})
})
let counter = rand(1000, 10000)
counter = rand(1000, 10000)
setTimeout(() => { setRandomRotations() }, counter)
}
}


Line 48: Line 49:
   });
   });
   counter = rand(1000, 10000)
   counter = rand(1000, 10000)
  setTimeout(() => { setBackgroundColors() }, counter)
}
}


// Gradually change the background color for all elements
// Gradually change the background color for all elements
function changeStylesGradually() {
function changeStylesGradually() {
   setInterval(() => { setRandomRotations() }, counter)
   setTimeout(() => { setRandomRotations() }, counter)
   setInterval(() => { setBackgroundColors() }, counter)
   setTimeout(() => { setBackgroundColors() }, counter)
}
}