Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leonardteo/8976640 to your computer and use it in GitHub Desktop.
Save leonardteo/8976640 to your computer and use it in GitHub Desktop.
Discourse FitVids to maximize size of video embeds
<script src="//cdnjs.cloudflare.com/ajax/libs/fitvids/1.0.1/jquery.fitvids.min.js"></script>
<script>
Discourse.PostView.reopen({
didInsertElement : function(){
this._super();
var $post = this.$();
$post.fitVids();
}
});
</script>
@toolness
Copy link

Thanks much for posting this snippet, it helped me add my own custom onebox hack to my discourse instance without having to fork discourse and add to its onebox whitelist. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment