ubergoob
6/11/2015 - 2:41 PM

Shia Do It web embedding without Chrome extension.

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>