From d6d1cd428910338598d7da57a8af0d78fcf5a09f Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 30 Apr 2014 20:40:25 -0500 Subject: [PATCH] Fix formatURL and parseMediaLink for google drive --- www/js/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/util.js b/www/js/util.js index 6c4f91bb..9d79cefe 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -57,7 +57,7 @@ function formatURL(data) { case "us": return "http://ustream.tv/" + data.id; case "gd": - return data.id; + return "https://docs.google.com/file/d/" + data.id; default: return "#"; } @@ -1259,7 +1259,7 @@ function parseMediaLink(url) { }; } - if ((m = url.match(/docs\.google\.com\/file\/d\/(.*?)\/edit/))) { + if ((m = url.match(/docs\.google\.com\/file\/d\/(.*)(\/edit)?/))) { return { id: m[1], type: "gd"