From 91b1255d96cf6011fa82e69d319f8e063ce98954 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Tue, 27 Nov 2012 11:47:44 -0600 Subject: [PATCH] story form: auto-apply video tag to vimeo links, too --- app/views/stories/new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/stories/new.html.erb b/app/views/stories/new.html.erb index edb811a..96cd463 100644 --- a/app/views/stories/new.html.erb +++ b/app/views/stories/new.html.erb @@ -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)