Last active
August 29, 2015 14:04
-
-
Save kviktor/d83e88134e0eca8eba46 to your computer and use it in GitHub Desktop.
sg.hu html5video
This file contains 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
var e_v='<div class="html5-video-wrapper"><video controls src="$1"></video><p><a href="$1">$1</a></p></div>';var t_v='<div class="html5-video-wrapper"><video autoplay loop src="$1"></video></div>';$(".forum-post .body").each(function(){if($(this).html().match(/\[video\](.*?)\[\/video\]/gi))$(this).html($(this).html().replace(/\[video\](.*gfycat\.com.*?)\[\/video\]/gi,t_v).replace(/\[video\](.*?)\[\/video\]/gi,e_v))}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment