Skip to content

Instantly share code, notes, and snippets.

@trooney
Last active August 29, 2015 14:05
Show Gist options
  • Save trooney/f103c2643decb7fda38e to your computer and use it in GitHub Desktop.
Save trooney/f103c2643decb7fda38e to your computer and use it in GitHub Desktop.
Turn any website with jQuery into a party!
/* Paste into console */
window.party=function(){if(window.$==undefined)return"You need jQuery to party!";var $mask,$video;$mask=$('<div style="position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-color: #000; background-image: url(http://i.imgur.com/1bxqLXC.jpg); opacity: 0.9; background-size: cover; z-index: 1000;" />');$video=$('<iframe width="420" height="315" src="//www.youtube.com/embed/bDbpzjbXUZI?autoplay=1" frameborder="0" allowfullscreen style="position:absolute; top: 50%; left: 50%; margin-left: -210px; margin-top:-150px; z-index:1005;"></iframe>');
$mask.appendTo("body");$video.appendTo("body");return"lets do it!!"};"ready to party? call window.party()";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment