From b21d129d2c370bb7aec8e0f1ce493f283cf50ddd Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 27 Jun 2013 14:29:56 +0200 Subject: [PATCH] OPPG-376: The forgotten code! --- js/h5p.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 4df6f3d..3b1fa97 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -104,9 +104,12 @@ H5P.fullScreen = function ($el, obj) { /** * Find the path to the content files base on the id of the content. */ -H5P.getContentPath = function(contentId) { - // TODO: Rewrite or remove... H5P.getContentPath = H5PIntegration.getContentPath would probably work f.i. - return H5PIntegration.getContentPath(contentId); +H5P.getPath = function (path, contentId) { + if (path.substr(0, 7) === 'http://' || path.substr(0, 8) === 'https://') { + return path; + } + + return H5PIntegration.getContentPath(contentId) + path; }; //