Skip to content

Instantly share code, notes, and snippets.

@ubergoober
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save ubergoober/d461c32e4c877041a326 to your computer and use it in GitHub Desktop.

Select an option

Save ubergoober/d461c32e4c877041a326 to your computer and use it in GitHub Desktop.
Shia Do It web embedding without Chrome extension.
// Shia Do-It motivational overlay
// Found @ https://github.com/etaheri/do-it-chrome-extension
// Forked here https://github.com/ubergoob/do-it-chrome-extension
// assets can be gotten from either.
// Edit path to the video and the selector to hook.
<div class="shia-do-it"><div class="container"><video width="960" height="540" name="media" src="http://HOST/PATH/output.webm" style="visibility: hidden;"><source type="video/webm"></video></div></div>
<script type="application/javascript">
$(document).ready(function() {
$('SELECTORTOHOOK').on('click', function(){
var vid = $('.shia-do-it video');
vid.css("visibility", "visible");
vid.get(0).play();
return false;
})
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment