diff --git a/CHANGELOG.md b/CHANGELOG.md index 93d14afcc..f270b8ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### v1.14.21 +**v1.14.21.3** *(2021-05-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.3/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.3/builds/4chan-X-noupdate.crx)] +- Fix race condition causing unread posts tracking to malfunction. + **v1.14.21.2** *(2021-05-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.2/builds/4chan-X-noupdate.crx)] - Fix bug introduced in v1.14.21.1 causing error message when menu opened. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index a6b039fa3..31ac6ddf6 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 0a8df5ff6..06d6236da 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.21.2 +// @version 1.14.21.3 // @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 0c944a551..11f69fa49 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.21.2 +// @version 1.14.21.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.2', + VERSION: '1.14.21.3', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -20695,13 +20695,23 @@ Favicon = (function() { return d.head && (Favicon.el = $('link[rel="shortcut icon"]', d.head)); }), Favicon.initAsap); }, + set: function(status) { + Favicon.status = status; + if (Favicon.el) { + Favicon.el.href = Favicon[status]; + return $.add(d.head, Favicon.el); + } + }, initAsap: function() { var href; Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; Favicon.isSFW = /ws\.ico$/.test(href); Favicon["default"] = href; - return Favicon["switch"](); + Favicon["switch"](); + if (Favicon.status) { + return Favicon.set(Favicon.status); + } }, "switch": function() { var f, i, items, t; @@ -22995,8 +23005,7 @@ Unread = (function() { Unread.saveThreadWatcherCount(); if (Conf['Unread Favicon'] && g.SITE.software === 'yotsuba') { isDead = Unread.thread.isDead; - Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default']; - return $.add(d.head, Favicon.el); + return Favicon.set((countQuotingYou ? (isDead ? 'unreadDeadY' : 'unreadY') : count ? (isDead ? 'unreadDead' : 'unread') : (isDead ? 'dead' : 'default'))); } }, saveThreadWatcherCount: $.debounce(2 * $.SECOND, function() { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 419a7cbbc..b639cca4e 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 ef29714c4..4258ca1ab 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.21.2 +// @version 1.14.21.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.2', + VERSION: '1.14.21.3', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -20695,13 +20695,23 @@ Favicon = (function() { return d.head && (Favicon.el = $('link[rel="shortcut icon"]', d.head)); }), Favicon.initAsap); }, + set: function(status) { + Favicon.status = status; + if (Favicon.el) { + Favicon.el.href = Favicon[status]; + return $.add(d.head, Favicon.el); + } + }, initAsap: function() { var href; Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; Favicon.isSFW = /ws\.ico$/.test(href); Favicon["default"] = href; - return Favicon["switch"](); + Favicon["switch"](); + if (Favicon.status) { + return Favicon.set(Favicon.status); + } }, "switch": function() { var f, i, items, t; @@ -22995,8 +23005,7 @@ Unread = (function() { Unread.saveThreadWatcherCount(); if (Conf['Unread Favicon'] && g.SITE.software === 'yotsuba') { isDead = Unread.thread.isDead; - Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default']; - return $.add(d.head, Favicon.el); + return Favicon.set((countQuotingYou ? (isDead ? 'unreadDeadY' : 'unreadY') : count ? (isDead ? 'unreadDead' : 'unread') : (isDead ? 'dead' : 'default'))); } }, saveThreadWatcherCount: $.debounce(2 * $.SECOND, function() { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 9132ec6fc..30c57bd0a 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 6dc44123e..71ec614d4 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.21.2 +// @version 1.14.21.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 81cc964f4..40e397241 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.21.2 +// @version 1.14.21.3 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.2', + VERSION: '1.14.21.3', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -20695,13 +20695,23 @@ Favicon = (function() { return d.head && (Favicon.el = $('link[rel="shortcut icon"]', d.head)); }), Favicon.initAsap); }, + set: function(status) { + Favicon.status = status; + if (Favicon.el) { + Favicon.el.href = Favicon[status]; + return $.add(d.head, Favicon.el); + } + }, initAsap: function() { var href; Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; Favicon.isSFW = /ws\.ico$/.test(href); Favicon["default"] = href; - return Favicon["switch"](); + Favicon["switch"](); + if (Favicon.status) { + return Favicon.set(Favicon.status); + } }, "switch": function() { var f, i, items, t; @@ -22995,8 +23005,7 @@ Unread = (function() { Unread.saveThreadWatcherCount(); if (Conf['Unread Favicon'] && g.SITE.software === 'yotsuba') { isDead = Unread.thread.isDead; - Favicon.el.href = countQuotingYou ? Favicon[isDead ? 'unreadDeadY' : 'unreadY'] : count ? Favicon[isDead ? 'unreadDead' : 'unread'] : Favicon[isDead ? 'dead' : 'default']; - return $.add(d.head, Favicon.el); + return Favicon.set((countQuotingYou ? (isDead ? 'unreadDeadY' : 'unreadY') : count ? (isDead ? 'unreadDead' : 'unread') : (isDead ? 'dead' : 'default'))); } }, saveThreadWatcherCount: $.debounce(2 * $.SECOND, function() { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 41ed9daee..f908ce4c6 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 00a65652e..fbf5149d4 100644 --- a/builds/updates-beta.json +++ b/builds/updates-beta.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.21.2", + "version": "1.14.21.3", "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 9e3f55b2e..513cc85d0 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 8cd9b414e..75215e77d 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.21.2", + "version": "1.14.21.3", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index a58f07ad5..1117a6594 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 58052db3d..2867a2ecf 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.21.2", - "date": "2021-05-07T02:43:56.365Z" + "version": "1.14.21.3", + "date": "2021-05-07T07:49:08.122Z" } \ No newline at end of file