diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d7fd4c5b..437d0eaeb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ The links to individual versions below are to copies of the script with the upda ### v1.10.1 +**v1.10.1.16** *(2015-02-26)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.16/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.16/builds/4chan-X-noupdate.crx "Chromium version")] +- Fix thread watcher data corruption issue. + **v1.10.1.15** *(2015-02-23)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.15/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.1.15/builds/4chan-X-noupdate.crx "Chromium version")] - (VoH) Restore Nyafuu archive. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 5f0536c96..67c78f2d2 100644 Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js index 85c06570b..fa664722e 100644 --- a/builds/4chan-X-beta.meta.js +++ b/builds/4chan-X-beta.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.10.1.15 +// @version 1.10.1.16 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index f1dc05e5d..632537672 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.10.1.15 +// @version 1.10.1.16 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -26,7 +26,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.10.1.15 +* 4chan X * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -406,7 +406,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.1.15', + VERSION: '1.10.1.16', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -1681,8 +1681,8 @@ var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { - if (!threadID) { - if (postID) { + if (threadID == null) { + if (postID != null) { for (thread = _i = 0, _len = board.length; _i < _len; thread = ++_i) { ID = board[thread]; if (postID in thread) { @@ -1694,7 +1694,7 @@ val = board; } } else if (thread = board[threadID]) { - val = postID ? thread[postID] : thread; + val = postID != null ? thread[postID] : thread; } } return val || defaultValue; @@ -12595,8 +12595,8 @@ _ref = db.data.boards[boardID]; for (threadID in _ref) { data = _ref[threadID]; - if (!data.isDead && !(threadID in g.BOARD.threads)) { - if (Conf['Auto Prune']) { + if (!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads)) { + if (Conf['Auto Prune'] || !(data && typeof data === 'object')) { ThreadWatcher.db["delete"]({ boardID: boardID, threadID: threadID @@ -12778,11 +12778,13 @@ } for (threadID in threads) { data = threads[threadID]; - all.push({ - boardID: boardID, - threadID: threadID, - data: data - }); + if (data && typeof data === 'object') { + all.push({ + boardID: boardID, + threadID: threadID, + data: data + }); + } } } return all; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index d64cf3437..3d7e3a001 100644 Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js index 7dc894821..aa03d92cc 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.1.15 +// @version 1.10.1.16 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -25,7 +25,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.10.1.15 +* 4chan X * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -405,7 +405,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.1.15', + VERSION: '1.10.1.16', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -1680,8 +1680,8 @@ var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { - if (!threadID) { - if (postID) { + if (threadID == null) { + if (postID != null) { for (thread = _i = 0, _len = board.length; _i < _len; thread = ++_i) { ID = board[thread]; if (postID in thread) { @@ -1693,7 +1693,7 @@ val = board; } } else if (thread = board[threadID]) { - val = postID ? thread[postID] : thread; + val = postID != null ? thread[postID] : thread; } } return val || defaultValue; @@ -12594,8 +12594,8 @@ _ref = db.data.boards[boardID]; for (threadID in _ref) { data = _ref[threadID]; - if (!data.isDead && !(threadID in g.BOARD.threads)) { - if (Conf['Auto Prune']) { + if (!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads)) { + if (Conf['Auto Prune'] || !(data && typeof data === 'object')) { ThreadWatcher.db["delete"]({ boardID: boardID, threadID: threadID @@ -12777,11 +12777,13 @@ } for (threadID in threads) { data = threads[threadID]; - all.push({ - boardID: boardID, - threadID: threadID, - data: data - }); + if (data && typeof data === 'object') { + all.push({ + boardID: boardID, + threadID: threadID, + data: data + }); + } } } return all; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 25572b132..cd8984fba 100644 Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index dccee5b08..5ed66a7d3 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.10.1.15 +// @version 1.10.1.16 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 30a6aeab4..a422113da 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.1.15 +// @version 1.10.1.16 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -26,7 +26,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.10.1.15 +* 4chan X * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -406,7 +406,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.1.15', + VERSION: '1.10.1.16', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -1681,8 +1681,8 @@ var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { - if (!threadID) { - if (postID) { + if (threadID == null) { + if (postID != null) { for (thread = _i = 0, _len = board.length; _i < _len; thread = ++_i) { ID = board[thread]; if (postID in thread) { @@ -1694,7 +1694,7 @@ val = board; } } else if (thread = board[threadID]) { - val = postID ? thread[postID] : thread; + val = postID != null ? thread[postID] : thread; } } return val || defaultValue; @@ -12595,8 +12595,8 @@ _ref = db.data.boards[boardID]; for (threadID in _ref) { data = _ref[threadID]; - if (!data.isDead && !(threadID in g.BOARD.threads)) { - if (Conf['Auto Prune']) { + if (!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads)) { + if (Conf['Auto Prune'] || !(data && typeof data === 'object')) { ThreadWatcher.db["delete"]({ boardID: boardID, threadID: threadID @@ -12778,11 +12778,13 @@ } for (threadID in threads) { data = threads[threadID]; - all.push({ - boardID: boardID, - threadID: threadID, - data: data - }); + if (data && typeof data === 'object') { + all.push({ + boardID: boardID, + threadID: threadID, + data: data + }); + } } } return all; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index efd0e784e..544884f1b 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index 5686e2287..42129b26d 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index d246e73bd..ca25d0ad4 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index e9dfda53b..ef5682589 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", - "version": "1.10.1.15", + "version": "1.10.1.16", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",