mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-06 21:36:30 +02:00
Single source of truth for current location.
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
|
|
||||||
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.href.replace(/^.*:\/\/[^\/]*/, '').replace(/[^\/]*$/, '');
|
var entry = Entry.get();
|
||||||
|
|
||||||
parser.parse(absHref, $('body'));
|
parser.parse(entry.absHref, $('body'));
|
||||||
$('#data-apache-autoindex').remove();
|
$('#data-apache-autoindex').remove();
|
||||||
|
|
||||||
var entry = Entry.get(absHref);
|
|
||||||
entry.status = 'h5ai';
|
entry.status = 'h5ai';
|
||||||
if (entry.parent) {
|
if (entry.parent) {
|
||||||
entry.parent.isParentFolder = true;
|
entry.parent.isParentFolder = true;
|
||||||
|
Reference in New Issue
Block a user