- Joined
- Jun 17, 2019
Since its Halloween I wanted to post a fun script as a treat for you all.
Copy it and paste it in the developer console via F12 while on this website. Some browsers may require you to type "allow pasting" before it will actually run the script for security reasons. This code is simplistic enough that you can see its not doing anything compromising to yourself or the website. Its just something I do to any website that has the Font Awesome library attached to it.
If you're nervous about running it, allow other people who can read code to let you know if i'm a sneaky daring hacker trying to steal your soul or not.
Enjoy the whimsy
Copy it and paste it in the developer console via F12 while on this website. Some browsers may require you to type "allow pasting" before it will actually run the script for security reasons. This code is simplistic enough that you can see its not doing anything compromising to yourself or the website. Its just something I do to any website that has the Font Awesome library attached to it.
If you're nervous about running it, allow other people who can read code to let you know if i'm a sneaky daring hacker trying to steal your soul or not.
Enjoy the whimsy
JavaScript:
(function addSpinClassWithRandomRate() {
document.querySelectorAll('*').forEach(element => {
if (element.children.length === 0 && Math.random() > 1/3) {
element.classList.add('fa-spin');
element.style.animationDuration = `${(Math.random() * 2.5 + 0.5).toFixed(2)}s`;
}
});
})();