Created
July 28, 2017 23:32
-
-
Save mostobriv/cf4661e76fbadc20810bca7611b78b5a to your computer and use it in GitHub Desktop.
4h@ck3rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initAnimation(i,l){for(var n=document.getElementsByClassName("tnsl-"+i),t=0;t<n.length;t++)n[t].style.animationDelay=Math.random()*l+0+"s",n[t].style.animationName=i}function tnslReplaceRandom(i){void 0===i&&(i=["flicker","flickerQuick","slideFromLeft","slideFromRight"]);for(var l=document.getElementsByClassName("tnsl-random");l.length;){var n=l[0],t="tnsl-"+i[Math.floor(Math.random()*i.length+0)];n.classList.remove("tnsl-random"),n.classList.add(t)}}function tnslPlayFlicker(i){void 0===i&&(i=1),initAnimation("flicker",i)}function tnslPlayFlickerQuick(i){void 0===i&&(i=1),initAnimation("flickerQuick",i)}function tnslPlaySlideFromLeft(i){void 0===i&&(i=1),initAnimation("slideFromLeft",i)}function tnslPlaySlideFromRight(i){void 0===i&&(i=1),initAnimation("slideFromRight",i)}function tnslPlayAllFlicker(i){void 0===i&&(i=1),initAnimation("flicker",i),initAnimation("flickerQuick",i)}function tnslPlayAllSlide(i){void 0===i&&(i=1),tnslPlaySlideFromLeft(i),tnslPlaySlideFromRight(i)}function tnslPlayAll(i){void 0===i&&(i=1),tnslPlayAllFlicker(i),tnslPlayAllSlide(i)}function tnslInit(i){void 0===i&&(i=1),tnslReplaceRandom(),tnslPlayAll(i)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment