mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-08 02:24:39 -04:00
Add option related to non-h5ai links.
This commit is contained in:
parent
1dd6e5c7b0
commit
7d0a691bc3
2 changed files with 9 additions and 5 deletions
|
@ -2,7 +2,8 @@
|
||||||
modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event', 'core/notify'], function (_, modernizr, allsettings, event, notify) {
|
modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event', 'core/notify'], function (_, modernizr, allsettings, event, notify) {
|
||||||
|
|
||||||
var settings = _.extend({
|
var settings = _.extend({
|
||||||
smartBrowsing: false
|
smartBrowsing: true,
|
||||||
|
extInNewWindow: true
|
||||||
}, allsettings.view),
|
}, allsettings.view),
|
||||||
|
|
||||||
doc = document,
|
doc = document,
|
||||||
|
@ -106,7 +107,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.status !== '=h5ai=') {
|
if (settings.extInNewWindow && item.status !== '=h5ai=') {
|
||||||
$el.attr('target', '_blank');
|
$el.attr('target', '_blank');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,8 +30,10 @@ Options
|
||||||
so that it will be persistent.
|
so that it will be persistent.
|
||||||
- setParentFolderLabels: set parent folder labels to real folder names
|
- setParentFolderLabels: set parent folder labels to real folder names
|
||||||
- binaryPrefix: set to true uses 1024B=1KiB when formatting file sizes (see http://en.wikipedia.org/wiki/Binary_prefix)
|
- binaryPrefix: set to true uses 1024B=1KiB when formatting file sizes (see http://en.wikipedia.org/wiki/Binary_prefix)
|
||||||
- indexFiles [php only]: consider folder with those files as non {{pkg.name}} folders
|
- indexFiles: consider folder with those files as non {{pkg.name}} folders
|
||||||
- ignore [php only]: don't list items matching these regular expressions
|
- ignore: don't list items matching these regular expressions
|
||||||
|
- smartBrowsing: use browser history if available (no need to reload the whole page)
|
||||||
|
- extInNewWindow: open non-h5ai links in new window/tab
|
||||||
*/
|
*/
|
||||||
"view": {
|
"view": {
|
||||||
"modes": ["details", "icons", "grid", "list"],
|
"modes": ["details", "icons", "grid", "list"],
|
||||||
|
@ -39,7 +41,8 @@ Options
|
||||||
"binaryPrefix": false,
|
"binaryPrefix": false,
|
||||||
"indexFiles": ["index.html", "index.htm", "index.php"],
|
"indexFiles": ["index.html", "index.htm", "index.php"],
|
||||||
"ignore": ["^\\.", "^_{{pkg.name}}"],
|
"ignore": ["^\\.", "^_{{pkg.name}}"],
|
||||||
"smartBrowsing": true
|
"smartBrowsing": true,
|
||||||
|
"extInNewWindow": true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue