diff --git a/src/_h5ai/js/inc/core/entry.js b/src/_h5ai/js/inc/core/entry.js index 3e82d5fc..9764904b 100644 --- a/src/_h5ai/js/inc/core/entry.js +++ b/src/_h5ai/js/inc/core/entry.js @@ -1,7 +1,7 @@ modulejs.define('core/entry', ['$', 'core/parser', 'model/entry'], function ($, parser, Entry) { - var absHref = document.location.pathname.replace(/[^\/]*$/, ''); + var absHref = document.location.href.replace(/^.*:\/\/[^\/]*/, '').replace(/[^\/]*$/, ''); parser.parse(absHref, $('body')); $('#data-apache-autoindex').remove(); diff --git a/src/_h5ai/js/inc/model/entry.js b/src/_h5ai/js/inc/model/entry.js index 85d080c8..dbbad6ac 100644 --- a/src/_h5ai/js/inc/model/entry.js +++ b/src/_h5ai/js/inc/model/entry.js @@ -2,7 +2,7 @@ modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, types, ajax) { var domain = document.domain, - location = document.location.pathname.replace(/[^\/]*$/, ''), + location = document.location.href.replace(/^.*:\/\/[^\/]*/, '').replace(/[^\/]*$/, ''), // utils