Browse Source

Https media type

When a media url (json conf : assets / media) starting with https:// is parsed, the determined type is "unknown media" which leads to a plain text url in the timeline.
pull/781/head
Julien Elbaz 10 years ago
parent
commit
d8dcf8552c
  1. 4
      source/js/Core/Media/VMM.MediaType.js

4
source/js/Core/Media/VMM.MediaType.js

@ -133,7 +133,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
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;
} else if (d.indexOf('http://') == 0) { } else if (d.indexOf('http://') == 0 || d.indexOf('https://') == 0) {
media.type = "website"; media.type = "website";
media.id = d; media.id = d;
success = true; success = true;
@ -156,4 +156,4 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
} }
return false; return false;
} }
} }

Loading…
Cancel
Save