diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a7b3b904..d1b3abd59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### v1.14.21 +**v1.14.21.6** *(2021-07-08)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.6/builds/4chan-X-noupdate.crx)] +- Captcha related bugfixes. + **v1.14.21.5** *(2021-07-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.5/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.5/builds/4chan-X-noupdate.crx)] - Fix bug causing captcha to sometimes not work when replying from index. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index a102e1fd3..a00d2701d 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 3c135b8e3..6cafeef94 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.5 +// @version 1.14.21.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 ffbd1011d..d40fd2de2 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.5 +// @version 1.14.21.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.5', + VERSION: '1.14.21.6', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23805,7 +23805,10 @@ Captcha = {}; }, updateThread: function() { var boardID, newThread, ref, threadID; - ref = Captcha.t.currentThread, boardID = ref.boardID, threadID = ref.threadID; + if (!this.isEnabled) { + return; + } + ref = Captcha.t.currentThread || {}, boardID = ref.boardID, threadID = ref.threadID; newThread = Captcha.t.getThread(); if (!(newThread.boardID === boardID && newThread.threadID === threadID)) { Captcha.t.destroy(); @@ -24295,7 +24298,7 @@ QR = (function() { }, initReady: function() { var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; - captchaVersion = $('#t-root') ? 't' : 'v2'; + captchaVersion = $('#g-recaptcha, #captcha-forced-noscript') ? 'v2' : 't'; QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 5e06564da..a05a513b6 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 f3a1df160..52ca61474 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.5 +// @version 1.14.21.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.5', + VERSION: '1.14.21.6', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23805,7 +23805,10 @@ Captcha = {}; }, updateThread: function() { var boardID, newThread, ref, threadID; - ref = Captcha.t.currentThread, boardID = ref.boardID, threadID = ref.threadID; + if (!this.isEnabled) { + return; + } + ref = Captcha.t.currentThread || {}, boardID = ref.boardID, threadID = ref.threadID; newThread = Captcha.t.getThread(); if (!(newThread.boardID === boardID && newThread.threadID === threadID)) { Captcha.t.destroy(); @@ -24295,7 +24298,7 @@ QR = (function() { }, initReady: function() { var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; - captchaVersion = $('#t-root') ? 't' : 'v2'; + captchaVersion = $('#g-recaptcha, #captcha-forced-noscript') ? 'v2' : 't'; QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index e363c3fa9..a7c540ce1 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 1294f04f6..59b585c44 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.5 +// @version 1.14.21.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 28f27b257..154f86301 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.5 +// @version 1.14.21.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.5', + VERSION: '1.14.21.6', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23805,7 +23805,10 @@ Captcha = {}; }, updateThread: function() { var boardID, newThread, ref, threadID; - ref = Captcha.t.currentThread, boardID = ref.boardID, threadID = ref.threadID; + if (!this.isEnabled) { + return; + } + ref = Captcha.t.currentThread || {}, boardID = ref.boardID, threadID = ref.threadID; newThread = Captcha.t.getThread(); if (!(newThread.boardID === boardID && newThread.threadID === threadID)) { Captcha.t.destroy(); @@ -24295,7 +24298,7 @@ QR = (function() { }, initReady: function() { var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; - captchaVersion = $('#t-root') ? 't' : 'v2'; + captchaVersion = $('#g-recaptcha, #captcha-forced-noscript') ? 'v2' : 't'; QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index ecf1fed6f..df22229b3 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 a89702610..6b6dcf8f8 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.5", + "version": "1.14.21.6", "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 3c1389d81..12a5920f8 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 44c6733e6..76c47126f 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.21.5", + "version": "1.14.21.6", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index d54173130..f4140dea2 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/src/Posting/Captcha.t.coffee b/src/Posting/Captcha.t.coffee index 954b23fd7..4485b58f1 100644 --- a/src/Posting/Captcha.t.coffee +++ b/src/Posting/Captcha.t.coffee @@ -48,7 +48,8 @@ Captcha.t = delete @nodes.container updateThread: -> - {boardID, threadID} = Captcha.t.currentThread + return unless @isEnabled + {boardID, threadID} = (Captcha.t.currentThread or {}) newThread = Captcha.t.getThread() unless newThread.boardID is boardID and newThread.threadID is threadID Captcha.t.destroy() diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 0b5ee1c0d..1e2911b4c 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -48,7 +48,7 @@ QR = Header.addShortcut 'qr', sc, 540 initReady: -> - captchaVersion = if $('#t-root') then 't' else 'v2' + captchaVersion = if $('#g-recaptcha, #captcha-forced-noscript') then 'v2' else 't' QR.captcha = Captcha[captchaVersion] QR.postingIsEnabled = true diff --git a/version.json b/version.json index 0a7374711..e7dba0a9c 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.21.5", - "date": "2021-07-07T06:16:45.892Z" + "version": "1.14.21.6", + "date": "2021-07-08T03:54:56.178Z" } \ No newline at end of file