story form: auto-apply video tag to vimeo links, too

This commit is contained in:
joshua stein 2012-11-27 11:47:44 -06:00
parent e5a0b671b8
commit 91b1255d96

View file

@ -122,8 +122,8 @@
if (ta.getVal().indexOf("pdf") < 0)
ta.addSelectedChoice({ id: "pdf" });
}
/* if the url looks like a youtube url, assign the video tag */
else if ($("#story_url").val().match(/[\/\.]youtube\.com\//i)) {
/* if the url looks like a video site url, assign the video tag */
else if ($("#story_url").val().match(/[\/\.](youtube|vimeo)\.com\//i)) {
var ta = $("#story_tags_a").data("select2");
if (ta.getVal().indexOf("video") < 0)