Created
February 13, 2014 15:06
-
-
Save leonardteo/8976640 to your computer and use it in GitHub Desktop.
Discourse FitVids to maximize size of video embeds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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. 👍