-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweaintfoundshit.min.js
5 lines (5 loc) · 2.12 KB
/
weaintfoundshit.min.js
1
2
3
4
5
(function(){function q(a){var c=document[a];c&&(document[a]=function(a){a=c.call(document,a);h(a instanceof NodeList?0===a.length:!a);return a})}function r(){var a=jQuery.fn.init,c=jQuery(document);jQuery.fn.init=function(b,f){var k=new a(b,f,c);h((b||f)&&!k.length);return k}}function t(e){e&&!a.getElementsByTagName("video").length&&(d.type=window.WEAINTFOUND_VIDEO_TYPE,d.src=window.WEAINTFOUND_VIDEO_URL,u?(b?(b.pause(),b.load()):(b=document.createElement("video"),b.style.position="relative",b.style.top=
"50px",b.style.width="595px",b.style.height="321px",b.onended=function(c){a.removeChild(b);l(this)},d.onerror=m,b.appendChild(d)),a.appendChild(b),b.play()):m())}function m(){if(!a.getElementsByTagName("a").length){var e=document.createElement("a"),c=document.createElement("h1"),d=[{text:" ain't",delay:200},{text:" found ",delay:300},{text:"SHIT",delay:750}],f=function(){if(d.length){var b=d.shift();setTimeout(function(){c.innerHTML=d.length?c.innerHTML+b.text:c.innerHTML+("<span>"+b.text+"</span>");
f()},b.delay)}else setTimeout(function(){a.removeChild(e);a.style.backgroundColor="transparent";l([this,"Source error"])},1900)};a.style.backgroundColor="#FFF";e.href=window.WEAINTFOUND_VIDEO_URL;e.target="_blank";c.innerHTML="We";c.style.textAlign="center";c.style.marginTop="20px";c.style.marginBottom="20px";e.appendChild(c);a.removeChild(b);a.appendChild(e);f()}}function l(){n&&jQuery(document).trigger("finished.weaintfoundshit",arguments)}var b,d=document.createElement("source"),u=document.createElement("video").canPlayType,
n="undefined"!==typeof jQuery,a=document.createElement("div");a.id="_weaintfoundshit_";a.style.position="fixed";a.style.top=0;a.style.right=0;a.style.width="100%";a.style.zIndex=1050;a.style.textAlign="center";document.getElementsByTagName("body")[0].appendChild(a);window.WEAINTFOUND_VIDEO_TYPE="video/mp4";window.WEAINTFOUND_VIDEO_URL="//i.imgur.com/2IuUuar.mp4";for(var p=["getElementById","getElementsByTagName","getElementsByClassName","querySelector","querySelectorAll"],g=0;g<p.length;g++)q(p[g]);
n&&r();var h=function(){var a;return function(b){b&&(clearTimeout(a),a=setTimeout(function(){t(b)},100))}}()})();