mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-31 07:18:21 -04:00
Cleans code.
This commit is contained in:
parent
885ce9e9e9
commit
910312f7ce
5 changed files with 35 additions and 104 deletions
|
@ -1,30 +0,0 @@
|
|||
|
||||
modulejs.define('ext/folderstatus', ['_', '$', 'core/settings', 'core/event', 'core/entry'], function (_, $, allsettings, event, entry) {
|
||||
|
||||
var settings = _.extend({
|
||||
enabled: false,
|
||||
maxChecks: 16,
|
||||
delay: 2000
|
||||
}, allsettings.folderstatus),
|
||||
|
||||
init = function () {
|
||||
|
||||
if (!settings.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.sub('ready', function () {
|
||||
|
||||
var count = 0;
|
||||
_.each(entry.content, function (e) {
|
||||
|
||||
if (e.isFolder() && e.status === null && count <= settings.maxChecks) {
|
||||
count += 1;
|
||||
setTimeout(function () { e.fetchStatus(); }, settings.delay);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue