mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-09 06:46:42 +02:00
Fixes issue 72: Duplicate tree entries and emtpy main view.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
modulejs.define('core/entry', ['$', 'core/parser', 'model/entry'], function ($, parser, Entry) {
|
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'));
|
parser.parse(absHref, $('body'));
|
||||||
$('#data-apache-autoindex').remove();
|
$('#data-apache-autoindex').remove();
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, types, ajax) {
|
modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, types, ajax) {
|
||||||
|
|
||||||
var domain = document.domain,
|
var domain = document.domain,
|
||||||
location = document.location.pathname.replace(/[^\/]*$/, ''),
|
location = document.location.href.replace(/^.*:\/\/[^\/]*/, '').replace(/[^\/]*$/, ''),
|
||||||
|
|
||||||
|
|
||||||
// utils
|
// utils
|
||||||
|
Reference in New Issue
Block a user