support https urls and serving via https
This commit is contained in:
parent
7be47e61dd
commit
4ad3f35560
|
@ -2,7 +2,8 @@ var padmaConfig = {
|
|||
'background': 'rgba(0,0,0,0.85)',
|
||||
'color': '#fff',
|
||||
'links_url': 'pad.ma/',
|
||||
'data_url': 'http://pad.ma/',
|
||||
'data_url': document.location.protocol + '//pad.ma/',
|
||||
'data_re': /https?:\/\/pad.ma\//,
|
||||
'default_layers': ['transcripts', 'descriptions'],
|
||||
};
|
||||
|
||||
|
|
3
utils.js
3
utils.js
|
@ -92,7 +92,7 @@ Gives a bunch of data parsed from a pad.ma url
|
|||
*/
|
||||
|
||||
function parsePadmaUrl(link, padma_url) {
|
||||
var regex = padmaConfig.data_url;
|
||||
var regex = padmaConfig.data_re;
|
||||
// var regex = new RegExp("http://.*" + padma_url);
|
||||
var linkStr = link.replace(regex, "");
|
||||
// alert(linkStr);
|
||||
|
@ -109,6 +109,7 @@ Gives a bunch of data parsed from a pad.ma url
|
|||
var postIdStr = linkStr.replace(r.videoId, '');
|
||||
postIdStr = postIdStr.replace("/", ""); //FIXME
|
||||
// console.log("postId", postIdStr);
|
||||
|
||||
if (postIdStr == 'info' || postIdStr == '') {
|
||||
r.type = 'info';
|
||||
return r;
|
||||
|
|
Loading…
Reference in New Issue
Block a user