boom
2 years ago in JavaScript
!function(){function e(e){var t=function(e){return{height:e.offsetHeight,width:e.offsetWidth}}(e);return t.height>n&&t.height<a&&t.width>o&&t.width<i}function t(){for(var e=document.getElementsByClassName(r),t=new RegExp("\\b"+r+"\\b");0<e.length;)e[0].className=e[0].className.replace(t,"")}for(var n=30,o=30,a=350,i=350,r="mw-harlem_shake_me",s="im_first",d=["im_drunk","im_baked","im_trippin","im_blown"],m="mw-strobe_light",l="mw_added_css",u=(void 0,w=document.documentElement,window.innerWidth?window.innerHeight:w&&!isNaN(w.clientHeight)?w.clientHeight:0),c=window.pageYOffset?window.pageYOffset:Math.max(document.documentElement.scrollTop,document.body.scrollTop),h=document.getElementsByTagName("*"),f=null,g=0;g<h.length;g++){if(e(E=h[g])&&(void 0,p=function(e){for(var t=e,n=0;t;)n+=t.offsetTop,t=t.offsetParent;return n}(E),c<=p&&p<=u+c)){f=E;break}}var p,w;if(null!==E){var b,v;(v=document.createElement("link")).setAttribute("type","text/css"),v.setAttribute("rel","stylesheet"),v.setAttribute("href","//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css"),v.setAttribute("class",l),document.body.appendChild(v),(b=document.createElement("audio")).setAttribute("class",l),b.src="//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3",b.loop=!1,b.addEventListener("canplay",function(){setTimeout(function(){!function(e){e.className+=" "+r+" "+s}(f)},500),setTimeout(function(){t(),function(){var e=document.createElement("div");e.setAttribute("class",m),document.body.appendChild(e),setTimeout(function(){document.body.removeChild(e)},100)}();for(var e=0;e<y.length;e++)y[e].className+=" "+r+" "+d[Math.floor(Math.random()*d.length)];alert(1337)},15500)},!0),b.addEventListener("ended",function(){t(),function(){for(var e=document.getElementsByClassName(l),t=0;t<e.length;t++)document.body.removeChild(e[t])}()},!0),b.innerHTML=" <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>",document.body.appendChild(b),b.play();var y=[];for(g=0;g<h.length;g++){var E;e(E=h[g])&&y.push(E)}}else console.warn("Could not find a node of the right size. Please try a different page.")}()
1