From eee77519b714fd41c2d7355859c1e0614306d05b Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Mon, 23 Mar 2015 09:45:02 +0100 Subject: [PATCH] Always use complete URLs. --- js/h5p-x-api-event.js | 2 +- js/h5p.js | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/js/h5p-x-api-event.js b/js/h5p-x-api-event.js index 141e232..24cb783 100644 --- a/js/h5p-x-api-event.js +++ b/js/h5p-x-api-event.js @@ -120,7 +120,7 @@ H5P.XAPIEvent.prototype.setActor = function() { this.data.statement.actor = { 'account': { 'name': uuid, - 'homePage': window.location.origin + H5PIntegration.basePath + 'homePage': H5PIntegration.siteUrl }, 'objectType': 'Agent' }; diff --git a/js/h5p.js b/js/h5p.js index a9c2617..d507f4c 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -234,20 +234,10 @@ H5P.init = function (target) { * @returns {string} HTML */ H5P.getHeadTags = function (contentId) { - var basePath = window.location.protocol + '//' + window.location.host + H5PIntegration.basePath; - - var createUrl = function (path) { - if (path.substring(0,7) !== 'http://' && path.substring(0,8) !== 'https://') { - // Not external, add base path. - path = basePath + path; - } - return path; - }; - var createStyleTags = function (styles) { var tags = ''; for (var i = 0; i < styles.length; i++) { - tags += ''; + tags += ''; } return tags; }; @@ -255,7 +245,7 @@ H5P.getHeadTags = function (contentId) { var createScriptTags = function (scripts) { var tags = ''; for (var i = 0; i < scripts.length; i++) { - tags += ''; + tags += ''; } return tags; };