-
Notifications
You must be signed in to change notification settings - Fork 0
/
vivid-btn-anim8.js
1 lines (1 loc) · 994 Bytes
/
vivid-btn-anim8.js
1
(function(){function v(){return o?document.querySelectorAll(o):s?document.getElementById(s):document.querySelector("form[action='/cart/add'] *[type='submit']")}function e(n){n.className+=" animated infinite "+u;setTimeout(function(){n.className=n.className.replace(" animated infinite "+u,"")},1e3)}function y(){typeof n[Symbol.iterator]=="function"?[...n].forEach(n=>{e(n),setInterval(()=>{e(n)},r)}):(e(n),setInterval(()=>{e(n)},r))}var i,r,u,o,s,l,h,f,t,n,c,a;if(!window.PreventVividLoad){for(i=document.createElement("link"),i.href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css",i.rel="stylesheet",document.head.appendChild(i),l=document.currentScript.src.split("?")[1],h=l.split("&"),f=0;f<h.length;f++)t=h[f].split("="),t[0]==="it"?r=parseInt(t[1])+1010:t[0]==="a"?u=t[1]:t[0]==="c"?o=t[1]:t[0]==="id"&&(s=t[1]);r&&u&&(n=v(),n&&(!n.length||n.length>0)?y():(c=0,a=setInterval(()=>{c++,n=v(),n&&(!n.length||n.length>0)&&y(),n||c>9,clearInterval(a)},1e3)))}})();