Skip to content

Instantly share code, notes, and snippets.

@dustinrue
Created July 13, 2013 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinrue/5991686 to your computer and use it in GitHub Desktop.
Save dustinrue/5991686 to your computer and use it in GitHub Desktop.
harlem shake at apple store
javascript:(function()%7Bfunction%20c()%7Bvar%20e=document.createElement(%22link%22);e.setAttribute(%22type%22,%22text/css%22);e.setAttribute(%22rel%22,%22stylesheet%22);e.setAttribute(%22href%22,f);e.setAttribute(%22class%22,l);document.body.appendChild(e)%7Dfunction%20h()%7Bvar%20e=document.getElementsByClassName(l);for(var%20t=0;t%3Ce.length;t++)%7Bdocument.body.removeChild(e%5Bt%5D)%7D%7Dfunction%20p()%7Bvar%20e=document.createElement(%22div%22);e.setAttribute(%22class%22,a);document.body.appendChild(e);setTimeout(function()%7Bdocument.body.removeChild(e)%7D,100)%7Dfunction%20d(e)%7Breturn%7Bheight:e.offsetHeight,width:e.offsetWidth%7D%7Dfunction%20v(i)%7Bvar%20s=d(i);return%20s.height%3Ee&&s.height%3Cn&&s.width%3Et&&s.width%3Cr%7Dfunction%20m(e)%7Bvar%20t=e;var%20n=0;while(!!t)%7Bn+=t.offsetTop;t=t.offsetParent%7Dreturn%20n%7Dfunction%20g()%7Bvar%20e=document.documentElement;if(!!window.innerWidth)%7Breturn%20window.innerHeight%7Delse%20if(e&&!isNaN(e.clientHeight))%7Breturn%20e.clientHeight%7Dreturn%200%7Dfunction%20y()%7Bif(window.pageYOffset)%7Breturn%20window.pageYOffset%7Dreturn%20Math.max(document.documentElement.scrollTop,document.body.scrollTop)%7Dfunction%20E(e)%7Bvar%20t=m(e);return%20t%3E=w&&t%3C=b+w%7Dfunction%20S()%7Bvar%20e=document.createElement(%22audio%22);e.setAttribute(%22class%22,l);e.src=i;e.loop=false;e.addEventListener(%22canplay%22,function()%7BsetTimeout(function()%7Bx(k)%7D,500);setTimeout(function()%7BN();p();for(var%20e=0;e%3CO.length;e++)%7BT(O%5Be%5D)%7D%7D,15500)%7D,true);e.addEventListener(%22ended%22,function()%7BN();h()%7D,true);e.innerHTML=%22%20%3Cp%3EIf%20you%20are%20reading%20this,%20it%20is%20because%20your%20browser%20does%20not%20support%20the%20audio%20element.%20We%20recommend%20that%20you%20get%20a%20new%20browser.%3C/p%3E%20%3Cp%3E%22;document.body.appendChild(e);e.play()%7Dfunction%20x(e)%7Be.className+=%22%20%22+s+%22%20%22+o%7Dfunction%20T(e)%7Be.className+=%22%20%22+s+%22%20%22+u%5BMath.floor(Math.random()*u.length)%5D%7Dfunction%20N()%7Bvar%20e=document.getElementsByClassName(s);var%20t=new%20RegExp(%22%5C%5Cb%22+s+%22%5C%5Cb%22);for(var%20n=0;n%3Ce.length;)%7Be%5Bn%5D.className=e%5Bn%5D.className.replace(t,%22%22)%7D%7Dvar%20e=30;var%20t=30;var%20n=350;var%20r=350;var%20i=%22//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3%22;var%20s=%22mw-harlem_shake_me%22;var%20o=%22im_first%22;var%20u=%5B%22im_drunk%22,%22im_baked%22,%22im_trippin%22,%22im_blown%22%5D;var%20a=%22mw-strobe_light%22;var%20f=%22//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css%22;var%20l=%22mw_added_css%22;var%20b=g();var%20w=y();var%20C=document.getElementsByTagName(%22*%22);var%20k=null;for(var%20L=0;L%3CC.length;L++)%7Bvar%20A=C%5BL%5D;if(v(A))%7Bif(E(A))%7Bk=A;break%7D%7D%7Dif(A===null)%7Bconsole.warn(%22Could%20not%20find%20a%20node%20of%20the%20right%20size.%20Please%20try%20a%20different%20page.%22);return%7Dc();S();var%20O=%5B%5D;for(var%20L=0;L%3CC.length;L++)%7Bvar%20A=C%5BL%5D;if(v(A))%7BO.push(A)%7D%7D%7D)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment