Skip to content
This repository was archived by the owner on Feb 20, 2020. It is now read-only.

Commit 25ffee5

Browse files
author
jennpb
authored
Merge pull request #8 from tomcrane/protocol-agnostic
embed script detects protocol
2 parents b865c5b + 74ece2c commit 25ffee5

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

build/embed.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/wellcomeTimeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 01675f1 - 2016-04-30
1+
// b865c5b - 2016-05-01
22
//-------
33
// convert calendar to Julian date
44
// (Julian day number algorithm adopted from Press et al.)

build/wellcomeTimeline.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/embed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
var a = document.createElement('a');
4545
a.href = scriptUri;
4646
var domain = a.hostname;
47+
var protocol = a.protocol;
4748
var port = (a.port == 80 ? '' : ':' + a.port);
4849

4950
$.when($.getScript('//' + domain + port + '/js/libs/easyXDM.min.js'),
@@ -150,7 +151,7 @@
150151

151152
function createSocket() {
152153

153-
var uri = "http://" + domain + port + "/timeline.html?" +
154+
var uri = protocol + "//" + domain + port + "/timeline.html?" +
154155
"isHomeDomain=" + isHomeDomain +
155156
"&isOnlyInstance=" + isOnlyInstance +
156157
"&dataUri=" + dataUri +

0 commit comments

Comments
 (0)