Fix formatURL and parseMediaLink for google drive
This commit is contained in:
parent
e9fc3cfaca
commit
d6d1cd4289
|
@ -57,7 +57,7 @@ function formatURL(data) {
|
||||||
case "us":
|
case "us":
|
||||||
return "http://ustream.tv/" + data.id;
|
return "http://ustream.tv/" + data.id;
|
||||||
case "gd":
|
case "gd":
|
||||||
return data.id;
|
return "https://docs.google.com/file/d/" + data.id;
|
||||||
default:
|
default:
|
||||||
return "#";
|
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 {
|
return {
|
||||||
id: m[1],
|
id: m[1],
|
||||||
type: "gd"
|
type: "gd"
|
||||||
|
|
Loading…
Reference in a new issue