diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8949a47..e8ffb353d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ### v1.14.5 +**v1.14.5.11** *(2019-01-26)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.5.11/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.5.11/builds/4chan-X-noupdate.crx)] +- Fix regression that broke favicon turning red on thread archival/404. #2190 +- Fix 'Auto Watch Reply' in corner cases when not all thread info is available. + **v1.14.5.10** *(2019-01-25)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.5.10/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.5.10/builds/4chan-X-noupdate.crx)] - Fix performance issues with video hover preview in long threads. #2214 diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index ab2e484e5..612fef1b3 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 b1a8be09b..2778ef275 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.14.5.10 +// @version 1.14.5.11 // @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 3ed290687..a02dd469f 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.14.5.10 +// @version 1.14.5.11 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.5.10', + VERSION: '1.14.5.11', NAMESPACE: '4chan X.', boards: {} }; @@ -20076,7 +20076,7 @@ ThreadWatcher = (function() { return ThreadWatcher.addRaw(boardID, threadID, {}); } } else if (Conf['Auto Watch Reply']) { - return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); + return ThreadWatcher.add(g.threads[boardID + '.' + threadID] || new Thread(threadID, g.boards[boardID] || new Board(boardID))); } }, onIndexUpdate: function(e) { @@ -20486,7 +20486,7 @@ ThreadWatcher = (function() { ThreadWatcher.setPrefixes(threads); for (i = 0, len1 = threads.length; i < len1; i++) { ref = threads[i], siteID = ref.siteID, boardID = ref.boardID, threadID = ref.threadID, data = ref.data; - if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID])) { + if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID]) && thread.OP) { ThreadWatcher.db.extend({ boardID: boardID, threadID: threadID, @@ -20642,7 +20642,9 @@ ThreadWatcher = (function() { } data.isDead = true; } - data.excerpt = Get.threadExcerpt(thread); + if (thread.OP) { + data.excerpt = Get.threadExcerpt(thread); + } return ThreadWatcher.addRaw(boardID, threadID, data); }, addRaw: function(boardID, threadID, data) { @@ -20835,7 +20837,12 @@ Unread = (function() { } } $.one(d, '4chanXInitFinished', Unread.ready); - return $.on(d, 'PostsInserted', Unread.onUpdate); + $.on(d, 'PostsInserted', Unread.onUpdate); + return $.on(d, 'ThreadUpdate', function(e) { + if (e.detail[404]) { + return Unread.update(); + } + }); }, ready: function() { if (Conf['Remember Last Read Post'] && Conf['Scroll to Last Read Post']) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 5926acc4c..5434b9e32 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 5d2385f2e..3f5ba2ca4 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.14.5.10 +// @version 1.14.5.11 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.5.10', + VERSION: '1.14.5.11', NAMESPACE: '4chan X.', boards: {} }; @@ -20076,7 +20076,7 @@ ThreadWatcher = (function() { return ThreadWatcher.addRaw(boardID, threadID, {}); } } else if (Conf['Auto Watch Reply']) { - return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); + return ThreadWatcher.add(g.threads[boardID + '.' + threadID] || new Thread(threadID, g.boards[boardID] || new Board(boardID))); } }, onIndexUpdate: function(e) { @@ -20486,7 +20486,7 @@ ThreadWatcher = (function() { ThreadWatcher.setPrefixes(threads); for (i = 0, len1 = threads.length; i < len1; i++) { ref = threads[i], siteID = ref.siteID, boardID = ref.boardID, threadID = ref.threadID, data = ref.data; - if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID])) { + if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID]) && thread.OP) { ThreadWatcher.db.extend({ boardID: boardID, threadID: threadID, @@ -20642,7 +20642,9 @@ ThreadWatcher = (function() { } data.isDead = true; } - data.excerpt = Get.threadExcerpt(thread); + if (thread.OP) { + data.excerpt = Get.threadExcerpt(thread); + } return ThreadWatcher.addRaw(boardID, threadID, data); }, addRaw: function(boardID, threadID, data) { @@ -20835,7 +20837,12 @@ Unread = (function() { } } $.one(d, '4chanXInitFinished', Unread.ready); - return $.on(d, 'PostsInserted', Unread.onUpdate); + $.on(d, 'PostsInserted', Unread.onUpdate); + return $.on(d, 'ThreadUpdate', function(e) { + if (e.detail[404]) { + return Unread.update(); + } + }); }, ready: function() { if (Conf['Remember Last Read Post'] && Conf['Scroll to Last Read Post']) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 6d489181a..3a506bef4 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 7b8f444b6..0364b961a 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.5.10 +// @version 1.14.5.11 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b5421dee7..4a23afb98 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.5.10 +// @version 1.14.5.11 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.5.10', + VERSION: '1.14.5.11', NAMESPACE: '4chan X.', boards: {} }; @@ -20076,7 +20076,7 @@ ThreadWatcher = (function() { return ThreadWatcher.addRaw(boardID, threadID, {}); } } else if (Conf['Auto Watch Reply']) { - return ThreadWatcher.add(g.threads[boardID + '.' + threadID]); + return ThreadWatcher.add(g.threads[boardID + '.' + threadID] || new Thread(threadID, g.boards[boardID] || new Board(boardID))); } }, onIndexUpdate: function(e) { @@ -20486,7 +20486,7 @@ ThreadWatcher = (function() { ThreadWatcher.setPrefixes(threads); for (i = 0, len1 = threads.length; i < len1; i++) { ref = threads[i], siteID = ref.siteID, boardID = ref.boardID, threadID = ref.threadID, data = ref.data; - if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID])) { + if ((data.excerpt == null) && siteID === Site.hostname && (thread = g.threads[boardID + "." + threadID]) && thread.OP) { ThreadWatcher.db.extend({ boardID: boardID, threadID: threadID, @@ -20642,7 +20642,9 @@ ThreadWatcher = (function() { } data.isDead = true; } - data.excerpt = Get.threadExcerpt(thread); + if (thread.OP) { + data.excerpt = Get.threadExcerpt(thread); + } return ThreadWatcher.addRaw(boardID, threadID, data); }, addRaw: function(boardID, threadID, data) { @@ -20835,7 +20837,12 @@ Unread = (function() { } } $.one(d, '4chanXInitFinished', Unread.ready); - return $.on(d, 'PostsInserted', Unread.onUpdate); + $.on(d, 'PostsInserted', Unread.onUpdate); + return $.on(d, 'ThreadUpdate', function(e) { + if (e.detail[404]) { + return Unread.update(); + } + }); }, ready: function() { if (Conf['Remember Last Read Post'] && Conf['Scroll to Last Read Post']) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 321d4832c..87e0ea2f7 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.json b/builds/updates-beta.json index 5830e1b81..c5cf95c12 100644 --- a/builds/updates-beta.json +++ b/builds/updates-beta.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.5.10", + "version": "1.14.5.11", "update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx" } ] diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index c2f393b73..801d41d54 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.json b/builds/updates.json index e2588c977..6c7fb0091 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.5.10", + "version": "1.14.5.11", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index 7810cf6ac..eb5a68b9e 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index a6aff25c3..60a481365 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.5.10", - "date": "2019-01-25T01:36:36.330Z" + "version": "1.14.5.11", + "date": "2019-01-26T07:46:43.086Z" } \ No newline at end of file