Skip to content

Commit

Permalink
Merge pull request #57 from zbynek/accept-absolute-url
Browse files Browse the repository at this point in the history
Accept absolute URLs for h5p content
  • Loading branch information
Jakeii authored Feb 2, 2021
2 parents 8f6faac + d8eced4 commit bccc5da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/frame.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/main.bundle.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/js/h5p-standalone.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import H5P from 'imports-loader?H5PIntegration=>window.H5PIntegration!H5P';
H5PIntegration = window.H5PIntegration;

function urlPath(file) {
if (file.match(/^[a-z0-9]+:\/\//i)) {
return file;
}
let prefix = window.location.protocol + "//" + window.location.host;

if (window.location.pathname.indexOf('/') > -1) {
Expand Down

0 comments on commit bccc5da

Please sign in to comment.