diff --git a/CHANGELOG.md b/CHANGELOG.md index a47f97a8e..101b9eabf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ## v1.13.0 +**v1.13.0.6** *(2016-10-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.6/builds/4chan-X-noupdate.crx)] +- Fix bug from v1.13.0.3 causing threads to be incorrectly pruned / marked dead in Thread Watcher. + **v1.13.0.5** *(2016-10-04)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.5/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.5/builds/4chan-X-noupdate.crx)] - (dzamie) `sfw` and `nsfw` can be used in the `boards` options of filters. - Mirror most of `Index Navigation` menu settings in main settings panel. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 9d819fc92..ec4343176 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 a881a4e02..677d0982c 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.13.0.5 +// @version 1.13.0.6 // @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 0f430c9da..babed79ec 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.13.0.5 +// @version 1.13.0.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.5', + VERSION: '1.13.0.6', NAMESPACE: '4chan X.', boards: {} }; @@ -6576,7 +6576,7 @@ Redirect = (function() { { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 5, "name": "Love is Over", "domain": "archive.loveisover.me", "http": true, "https": false, "software": "foolfuuka", "boards": [ "c", "d", "e", "i", "lgbt", "t", "u" ], "files": [ "c", "d", "e", "i", "lgbt", "t", "u" ] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, - { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "w", "wg", "wsg", "wsr", "x", "y" ] }, + { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "vip", "w", "wg", "wsg", "wsr", "x", "y" ] }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "b" ], "files": [ "b" ] }, { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ] } ], @@ -9758,7 +9758,7 @@ Index = (function() { return Index.pageLoad(); }, parseThreadList: function(pages) { - var data, i, k, len, obj, ref, ref1, results; + var ID, data, i, k, len, obj, ref, ref1, results; Index.pagesNum = pages.length; Index.threadsNumPerPage = ((ref = pages[0]) != null ? ref.threads.length : void 0) || 1; Index.liveThreadData = pages.reduce((function(arr, next) { @@ -9789,6 +9789,18 @@ Index = (function() { return thread.collect(); } }); + $.event('IndexUpdate', { + threads: (function() { + var l, len1, ref2, results1; + ref2 = Index.liveThreadIDs; + results1 = []; + for (l = 0, len1 = ref2.length; l < len1; l++) { + ID = ref2[l]; + results1.push(g.BOARD + "." + ID); + } + return results1; + })() + }); }, isHidden: function(threadID) { var thread; @@ -17815,6 +17827,7 @@ ThreadUpdater = (function() { ThreadWatcher = (function() { var ThreadWatcher, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, slice = [].slice; ThreadWatcher = { @@ -17847,7 +17860,7 @@ ThreadWatcher = (function() { $.onExists(doc, 'body', this.addDialog); switch (g.VIEW) { case 'index': - $.on(d, 'IndexRefreshInternal', this.cb.onIndexRefresh); + $.on(d, 'IndexUpdate', this.cb.onIndexUpdate); break; case 'thread': $.on(d, 'ThreadUpdate', this.cb.onThreadRefresh); @@ -18028,15 +18041,15 @@ ThreadWatcher = (function() { return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); } }, - onIndexRefresh: function() { - var boardID, data, db, nKilled, ref, threadID; + onIndexUpdate: function(e) { + var boardID, data, db, nKilled, ref, ref1, threadID; db = ThreadWatcher.db; boardID = g.BOARD.ID; nKilled = 0; ref = db.data.boards[boardID]; for (threadID in ref) { data = ref[threadID]; - if (!(!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads))) { + if (!(!(data != null ? data.isDead : void 0) && (ref1 = boardID + "." + threadID, indexOf.call(e.detail.threads, ref1) < 0))) { continue; } nKilled++; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 5c97098bf..4e45e3dee 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 561554b9d..e9dd8cb4d 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.0.5 +// @version 1.13.0.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.5', + VERSION: '1.13.0.6', NAMESPACE: '4chan X.', boards: {} }; @@ -6576,7 +6576,7 @@ Redirect = (function() { { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 5, "name": "Love is Over", "domain": "archive.loveisover.me", "http": true, "https": false, "software": "foolfuuka", "boards": [ "c", "d", "e", "i", "lgbt", "t", "u" ], "files": [ "c", "d", "e", "i", "lgbt", "t", "u" ] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, - { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "w", "wg", "wsg", "wsr", "x", "y" ] }, + { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "vip", "w", "wg", "wsg", "wsr", "x", "y" ] }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "b" ], "files": [ "b" ] }, { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ] } ], @@ -9758,7 +9758,7 @@ Index = (function() { return Index.pageLoad(); }, parseThreadList: function(pages) { - var data, i, k, len, obj, ref, ref1, results; + var ID, data, i, k, len, obj, ref, ref1, results; Index.pagesNum = pages.length; Index.threadsNumPerPage = ((ref = pages[0]) != null ? ref.threads.length : void 0) || 1; Index.liveThreadData = pages.reduce((function(arr, next) { @@ -9789,6 +9789,18 @@ Index = (function() { return thread.collect(); } }); + $.event('IndexUpdate', { + threads: (function() { + var l, len1, ref2, results1; + ref2 = Index.liveThreadIDs; + results1 = []; + for (l = 0, len1 = ref2.length; l < len1; l++) { + ID = ref2[l]; + results1.push(g.BOARD + "." + ID); + } + return results1; + })() + }); }, isHidden: function(threadID) { var thread; @@ -17815,6 +17827,7 @@ ThreadUpdater = (function() { ThreadWatcher = (function() { var ThreadWatcher, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, slice = [].slice; ThreadWatcher = { @@ -17847,7 +17860,7 @@ ThreadWatcher = (function() { $.onExists(doc, 'body', this.addDialog); switch (g.VIEW) { case 'index': - $.on(d, 'IndexRefreshInternal', this.cb.onIndexRefresh); + $.on(d, 'IndexUpdate', this.cb.onIndexUpdate); break; case 'thread': $.on(d, 'ThreadUpdate', this.cb.onThreadRefresh); @@ -18028,15 +18041,15 @@ ThreadWatcher = (function() { return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); } }, - onIndexRefresh: function() { - var boardID, data, db, nKilled, ref, threadID; + onIndexUpdate: function(e) { + var boardID, data, db, nKilled, ref, ref1, threadID; db = ThreadWatcher.db; boardID = g.BOARD.ID; nKilled = 0; ref = db.data.boards[boardID]; for (threadID in ref) { data = ref[threadID]; - if (!(!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads))) { + if (!(!(data != null ? data.isDead : void 0) && (ref1 = boardID + "." + threadID, indexOf.call(e.detail.threads, ref1) < 0))) { continue; } nKilled++; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 2301abcc7..efefeeb31 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 461fd3c89..69abda0a3 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.0.5 +// @version 1.13.0.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 8b8abf897..c989e2a0d 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.13.0.5 +// @version 1.13.0.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.13.0.5', + VERSION: '1.13.0.6', NAMESPACE: '4chan X.', boards: {} }; @@ -6576,7 +6576,7 @@ Redirect = (function() { { "uid": 25, "name": "arch.b4k.co", "domain": "arch.b4k.co", "http": true, "https": true, "software": "foolfuuka", "boards": [ "g", "jp", "mlp", "v" ], "files": [] }, { "uid": 5, "name": "Love is Over", "domain": "archive.loveisover.me", "http": true, "https": false, "software": "foolfuuka", "boards": [ "c", "d", "e", "i", "lgbt", "t", "u" ], "files": [ "c", "d", "e", "i", "lgbt", "t", "u" ] }, { "uid": 28, "name": "bstats", "domain": "archive.b-stats.org", "http": false, "https": true, "software": "foolfuuka", "boards": [ "f", "cm", "hm", "lgbt", "news", "qst", "trash", "y" ], "files": [] }, - { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "w", "wg", "wsg", "wsr", "x", "y" ] }, + { "uid": 29, "name": "Archived.Moe", "domain": "archived.moe", "http": true, "https": false, "software": "foolfuuka", "boards": [ "3", "a", "aco", "adv", "an", "asp", "b", "biz", "c", "cgl", "ck", "cm", "co", "d", "diy", "e", "f", "fa", "fit", "g", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "int", "jp", "k", "lgbt", "lit", "m", "mlp", "mu", "n", "news", "o", "out", "p", "po", "pol", "qa", "qst", "r", "r9k", "s", "s4s", "sci", "soc", "sp", "t", "tg", "toy", "trash", "trv", "tv", "u", "v", "vg", "vip", "vp", "vr", "w", "wg", "wsg", "wsr", "x", "y" ], "files": [ "gd", "po", "qst", "vip" ], "search": [ "aco", "adv", "an", "asp", "b", "c", "cgl", "ck", "cm", "con", "d", "diy", "e", "f", "gd", "gif", "h", "hc", "his", "hm", "hr", "i", "ic", "lgbt", "lit", "n", "news", "o", "out", "p", "po", "q", "qa", "qst", "r", "s", "soc", "trv", "u", "vip", "w", "wg", "wsg", "wsr", "x", "y" ] }, { "uid": 30, "name": "TheBArchive.com", "domain": "thebarchive.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "b" ], "files": [ "b" ] }, { "uid": 31, "name": "Archive Of Sins", "domain": "archiveofsins.com", "http": true, "https": false, "software": "foolfuuka", "boards": [ "h", "hc", "hm", "r", "s", "soc" ], "files": [ "h", "hc", "hm", "r", "s", "soc" ] } ], @@ -9758,7 +9758,7 @@ Index = (function() { return Index.pageLoad(); }, parseThreadList: function(pages) { - var data, i, k, len, obj, ref, ref1, results; + var ID, data, i, k, len, obj, ref, ref1, results; Index.pagesNum = pages.length; Index.threadsNumPerPage = ((ref = pages[0]) != null ? ref.threads.length : void 0) || 1; Index.liveThreadData = pages.reduce((function(arr, next) { @@ -9789,6 +9789,18 @@ Index = (function() { return thread.collect(); } }); + $.event('IndexUpdate', { + threads: (function() { + var l, len1, ref2, results1; + ref2 = Index.liveThreadIDs; + results1 = []; + for (l = 0, len1 = ref2.length; l < len1; l++) { + ID = ref2[l]; + results1.push(g.BOARD + "." + ID); + } + return results1; + })() + }); }, isHidden: function(threadID) { var thread; @@ -17815,6 +17827,7 @@ ThreadUpdater = (function() { ThreadWatcher = (function() { var ThreadWatcher, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, slice = [].slice; ThreadWatcher = { @@ -17847,7 +17860,7 @@ ThreadWatcher = (function() { $.onExists(doc, 'body', this.addDialog); switch (g.VIEW) { case 'index': - $.on(d, 'IndexRefreshInternal', this.cb.onIndexRefresh); + $.on(d, 'IndexUpdate', this.cb.onIndexUpdate); break; case 'thread': $.on(d, 'ThreadUpdate', this.cb.onThreadRefresh); @@ -18028,15 +18041,15 @@ ThreadWatcher = (function() { return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); } }, - onIndexRefresh: function() { - var boardID, data, db, nKilled, ref, threadID; + onIndexUpdate: function(e) { + var boardID, data, db, nKilled, ref, ref1, threadID; db = ThreadWatcher.db; boardID = g.BOARD.ID; nKilled = 0; ref = db.data.boards[boardID]; for (threadID in ref) { data = ref[threadID]; - if (!(!(data != null ? data.isDead : void 0) && !(threadID in g.BOARD.threads))) { + if (!(!(data != null ? data.isDead : void 0) && (ref1 = boardID + "." + threadID, indexOf.call(e.detail.threads, ref1) < 0))) { continue; } nKilled++; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index da4465968..619498b9e 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 0176d73cb..9e12ac536 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 bef8f1b1b..a1e5fd5fb 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index e587c3203..319ade725 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.13.0.5", - "date": "2016-10-04T10:26:00.739Z" + "version": "1.13.0.6", + "date": "2016-10-05T02:43:38.947Z" } \ No newline at end of file