Add imgur album embedding

This commit is contained in:
Calvin Montgomery 2013-06-04 22:47:02 -04:00
parent ef6a415c1b
commit 8c6d2ccfb2
3 changed files with 51 additions and 6 deletions

View file

@ -669,6 +669,8 @@ function parseVideoURL(url){
return [parseVimeo(url), "vi"];
else if(url.indexOf("dailymotion.com") != -1)
return [parseDailymotion(url), "dm"];
else if(url.indexOf("imgur.com") != -1)
return [parseImgur(url), "im"];
}
function parseYTURL(url) {
@ -743,6 +745,14 @@ function parseDailymotion(url) {
return null;
}
function parseImgur(url) {
var m = url.match(/imgur\.com\/a\/([a-zA-Z0-9]+)/);
if(m) {
return m[1];
}
return null;
}
function closePoll() {
if($("#pollcontainer .active").length != 0) {
var poll = $("#pollcontainer .active");