|
|
@ -125,11 +125,11 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') { |
|
|
|
media.type = "googledoc"; |
|
|
|
media.type = "googledoc"; |
|
|
|
media.id = d; |
|
|
|
media.id = d; |
|
|
|
success = true; |
|
|
|
success = true; |
|
|
|
} else if (d.match('(www.)?wikipedia\.org')) { |
|
|
|
} else if (d.match('^(?:http|https)://.*wikipedia\.org/wiki/([^\s#]+)')) { |
|
|
|
media.type = "wikipedia"; |
|
|
|
media.type = "wikipedia"; |
|
|
|
//media.id = d.split("wiki\/")[1];
|
|
|
|
//media.id = d.split("wiki\/")[1];
|
|
|
|
// TODO Issue #618 better splitting
|
|
|
|
// TODO Issue #618 better splitting
|
|
|
|
var wiki_id = d.split("wiki\/")[1].split("#")[0].replace("_", " "); |
|
|
|
var wiki_id = d.match('^(?:http|https)://.*wikipedia\.org/wiki/([^\s#]+)')[1].replace("_", " "); |
|
|
|
media.id = wiki_id.replace(" ", "%20"); |
|
|
|
media.id = wiki_id.replace(" ", "%20"); |
|
|
|
media.lang = d.split("//")[1].split(".wikipedia")[0]; |
|
|
|
media.lang = d.split("//")[1].split(".wikipedia")[0]; |
|
|
|
success = true; |
|
|
|
success = true; |
|
|
|