Merge branch 'v3'
Conflicts: LICENSE builds/appchan-x.user.js builds/crx/script.js
This commit is contained in:
commit
0ad639c4a9
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* appchan x - Version 2.9.7 - 2014-03-24
|
||||
* appchan x - Version 2.9.7 - 2014-03-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* appchan x - Version 2.9.7 - 2014-03-24
|
||||
* appchan x - Version 2.9.7 - 2014-03-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -3809,12 +3809,17 @@
|
||||
};
|
||||
|
||||
DataBoard.prototype.clean = function() {
|
||||
var boardID, now;
|
||||
var boardID, keys, now, _i, _len;
|
||||
now = Date.now();
|
||||
if ((this.data.lastChecked || 0) > now - 2 * $.HOUR) {
|
||||
return;
|
||||
}
|
||||
for (boardID in this.data.boards) {
|
||||
keys = Object.keys(this.data.boards);
|
||||
if (!keys.length) {
|
||||
return;
|
||||
}
|
||||
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
||||
boardID = keys[_i];
|
||||
this.deleteIfEmpty({
|
||||
boardID: boardID
|
||||
});
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* appchan x - Version 2.9.7 - 2014-03-24
|
||||
* appchan x - Version 2.9.7 - 2014-03-26
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -3096,7 +3096,9 @@
|
||||
Callbacks.prototype.execute = function(nodes) {
|
||||
var cb, err, errors, i, j, name, node;
|
||||
i = 0;
|
||||
c.time("Features");
|
||||
while (name = this.keys[i++]) {
|
||||
c.time(name);
|
||||
j = 0;
|
||||
cb = this[name];
|
||||
while (node = nodes[j++]) {
|
||||
@ -3115,7 +3117,9 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
c.timeEnd(name);
|
||||
}
|
||||
c.timeEnd("Features");
|
||||
if (errors) {
|
||||
return Main.handleErrors(errors);
|
||||
}
|
||||
@ -3865,12 +3869,20 @@
|
||||
};
|
||||
|
||||
DataBoard.prototype.clean = function() {
|
||||
var boardID, now;
|
||||
var boardID, keys, now, _i, _len;
|
||||
now = Date.now();
|
||||
if ((this.data.lastChecked || 0) > now - 2 * $.HOUR) {
|
||||
c.log('return now');
|
||||
return;
|
||||
}
|
||||
for (boardID in this.data.boards) {
|
||||
keys = Object.keys(this.data.boards);
|
||||
if (!keys.length) {
|
||||
c.log('return empty');
|
||||
return;
|
||||
}
|
||||
c.log('no return');
|
||||
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
||||
boardID = keys[_i];
|
||||
this.deleteIfEmpty({
|
||||
boardID: boardID
|
||||
});
|
||||
@ -5448,6 +5460,7 @@
|
||||
return Index.scrollToIndex();
|
||||
},
|
||||
parse: function(pages, pageNum) {
|
||||
c.time("Generating Index");
|
||||
Index.parseThreadList(pages);
|
||||
Index.buildThreads();
|
||||
Index.sort();
|
||||
@ -5455,7 +5468,8 @@
|
||||
Index.pageNav(pageNum);
|
||||
return;
|
||||
}
|
||||
return Index.buildIndex();
|
||||
Index.buildIndex();
|
||||
c.timeEnd("Generating Index");
|
||||
},
|
||||
parseThreadList: function(pages) {
|
||||
var i, j, live, page, thread, threads;
|
||||
|
||||
@ -64,7 +64,13 @@ class DataBoard
|
||||
now = Date.now()
|
||||
return if (@data.lastChecked or 0) > now - 2 * $.HOUR
|
||||
|
||||
for boardID of @data.boards
|
||||
# Don't even bother writing unless we have data to write
|
||||
keys = Object.keys @data.boards
|
||||
return unless keys.length
|
||||
|
||||
# Since we generated the keys anyways, use them to avoid the slow ``Object::hasOwnProperty`` method
|
||||
# Not that ``Object.keys`` is fast
|
||||
for boardID in keys
|
||||
@deleteIfEmpty {boardID}
|
||||
@ajaxClean boardID if boardID of @data.boards
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user