diff --git a/CHANGELOG.md b/CHANGELOG.md index f270b8ff3..9f5f8173b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### v1.14.21 +**v1.14.21.4** *(2021-07-05)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.4/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.21.4/builds/4chan-X-noupdate.crx)] +- Preliminary support for new first-party captcha on 4chan. + **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. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 31ac6ddf6..cddc2ac36 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 06d6236da..b165acc9b 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.3 +// @version 1.14.21.4 // @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 11f69fa49..8a832848f 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.3 +// @version 1.14.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.3', + VERSION: '1.14.21.4', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23732,6 +23732,98 @@ Captcha = {}; }).call(this); +(function() { + Captcha.t = { + init: function() { + var root; + if (d.cookie.indexOf('pass_enabled=1') >= 0) { + return; + } + if (!(this.isEnabled = !!$('#t-root') || !$.id('postForm'))) { + return; + } + root = $.el('div', { + className: 'captcha-root' + }); + this.nodes = { + root: root + }; + $.addClass(QR.nodes.el, 'has-captcha', 'captcha-t'); + return $.after(QR.nodes.com.parentNode, root); + }, + moreNeeded: function() {}, + setup: function(focus) { + var boardID, threadID; + if (!this.isEnabled) { + return; + } + if (!this.nodes.container) { + this.nodes.container = $.el('div', { + className: 'captcha-container' + }); + $.prepend(this.nodes.root, this.nodes.container); + boardID = g.BOARD.ID; + threadID = '' + QR.posts[0].thread; + $.global(function() { + var el; + el = document.querySelector('#qr .captcha-container'); + window.TCaptcha.init(el, this.boardID, +this.threadID); + return window.TCaptcha.setErrorCb(function(err) { + return window.dispatchEvent(new CustomEvent('CreateNotification', { + detail: { + type: 'warning', + content: '' + err + } + })); + }); + }, { + boardID: boardID, + threadID: threadID + }); + } + if (focus) { + return $('#t-resp').focus(); + } + }, + destroy: function() { + if (!(this.isEnabled && this.nodes.container)) { + return; + } + $.global(function() { + return window.TCaptcha.destroy(); + }); + $.rm(this.nodes.container); + return delete this.nodes.container; + }, + getOne: function() { + var i, key, len, ref, response; + response = {}; + if (this.nodes.container) { + ref = ['t-response', 't-challenge']; + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + response[key] = $("[name='" + key + "']", this.nodes.container).value; + } + } + if (!response['t-response']) { + response = null; + } + return response; + }, + setUsed: function() { + if (this.nodes.container) { + return $.global(function() { + return window.TCaptcha.clearChallenge(); + }); + } + }, + occupied: function() { + return !!this.nodes.container; + } + }; + +}).call(this); + (function() { var 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; }; @@ -24158,7 +24250,6 @@ QR = (function() { return; } this.posts = []; - this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); }); @@ -24186,7 +24277,9 @@ QR = (function() { return Header.addShortcut('qr', sc, 540); }, initReady: function() { - var config, link, linkBot, navLinksBot, origToggle, prop; + var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; + captchaVersion = $('#t-root') ? 't' : 'v2'; + QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { @@ -24964,8 +25057,11 @@ QR = (function() { if (g.BOARD.ID === 'r9k' && !((ref = post.com) != null ? ref.match(/[a-z-]/i) : void 0)) { err || (err = 'Original comment required.'); } - if (QR.captcha.isEnabled && !(/\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { - captcha = QR.captcha.getOne(!!threadID) || Captcha.cache.request(!!threadID); + if (QR.captcha.isEnabled && !(QR.captcha === Captcha.v2 && /\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { + captcha = QR.captcha.getOne(!!threadID); + if (QR.captcha === Captcha.v2) { + captcha || (captcha = Captcha.cache.request(!!threadID)); + } if (!captcha) { err = 'No valid captcha.'; QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); @@ -25015,13 +25111,21 @@ QR = (function() { }; } cb = function(response) { + var key, val; if (response != null) { QR.currentCaptcha = response; - if (response.challenge != null) { - options.form.append('recaptcha_challenge_field', response.challenge); - options.form.append('recaptcha_response_field', response.response); + if (QR.captcha === Captcha.v2) { + if (response.challenge != null) { + options.form.append('recaptcha_challenge_field', response.challenge); + options.form.append('recaptcha_response_field', response.response); + } else { + options.form.append('g-recaptcha-response', response.response); + } } else { - options.form.append('g-recaptcha-response', response.response); + for (key in response) { + val = response[key]; + options.form.append(key, val); + } } } QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options); @@ -25031,12 +25135,14 @@ QR = (function() { QR.req = { progress: '...', abort: function() { - Captcha.cache.abort(); + if (QR.captcha === Captcha.v2) { + Captcha.cache.abort(); + } return cb = null; } }; captcha(function(response) { - if (Captcha.cache.haveCookie()) { + if (QR.captcha === Captcha.v2 && Captcha.cache.haveCookie()) { if (typeof cb === "function") { cb(); } @@ -25058,7 +25164,7 @@ QR = (function() { return QR.status(); }, response: function() { - var URL, _, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; + var URL, _, base, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; if (this !== QR.req) { return; } @@ -25071,12 +25177,17 @@ QR = (function() { } } else if ((connErr = !this.response || this.response.title !== 'Post successful!')) { err = QR.connectionError(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } } else if (this.status !== 200) { err = "Error " + this.statusText + " (" + this.status + ")"; } + if (!connErr) { + if (typeof (base = QR.captcha).setUsed === "function") { + base.setUsed(); + } + } delete QR.currentCaptcha; if (err) { QR.errorCount = (QR.errorCount || 0) + 1; @@ -25197,7 +25308,7 @@ QR = (function() { if ((oldReq = QR.req) && !QR.req.isUploadFinished) { delete QR.req; oldReq.abort(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } delete QR.currentCaptcha; @@ -26003,7 +26114,9 @@ QR = (function() { } this.nodes.span.textContent = this.com; QR.captcha.moreNeeded(); - return Captcha.cache.prerequest(); + if (QR.captcha === Captcha.v2) { + return Captcha.cache.prerequest(); + } }; _Class.prototype.isOnlyQuotes = function() { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index b639cca4e..281072ab7 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 4258ca1ab..04b334f97 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.3 +// @version 1.14.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.3', + VERSION: '1.14.21.4', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23732,6 +23732,98 @@ Captcha = {}; }).call(this); +(function() { + Captcha.t = { + init: function() { + var root; + if (d.cookie.indexOf('pass_enabled=1') >= 0) { + return; + } + if (!(this.isEnabled = !!$('#t-root') || !$.id('postForm'))) { + return; + } + root = $.el('div', { + className: 'captcha-root' + }); + this.nodes = { + root: root + }; + $.addClass(QR.nodes.el, 'has-captcha', 'captcha-t'); + return $.after(QR.nodes.com.parentNode, root); + }, + moreNeeded: function() {}, + setup: function(focus) { + var boardID, threadID; + if (!this.isEnabled) { + return; + } + if (!this.nodes.container) { + this.nodes.container = $.el('div', { + className: 'captcha-container' + }); + $.prepend(this.nodes.root, this.nodes.container); + boardID = g.BOARD.ID; + threadID = '' + QR.posts[0].thread; + $.global(function() { + var el; + el = document.querySelector('#qr .captcha-container'); + window.TCaptcha.init(el, this.boardID, +this.threadID); + return window.TCaptcha.setErrorCb(function(err) { + return window.dispatchEvent(new CustomEvent('CreateNotification', { + detail: { + type: 'warning', + content: '' + err + } + })); + }); + }, { + boardID: boardID, + threadID: threadID + }); + } + if (focus) { + return $('#t-resp').focus(); + } + }, + destroy: function() { + if (!(this.isEnabled && this.nodes.container)) { + return; + } + $.global(function() { + return window.TCaptcha.destroy(); + }); + $.rm(this.nodes.container); + return delete this.nodes.container; + }, + getOne: function() { + var i, key, len, ref, response; + response = {}; + if (this.nodes.container) { + ref = ['t-response', 't-challenge']; + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + response[key] = $("[name='" + key + "']", this.nodes.container).value; + } + } + if (!response['t-response']) { + response = null; + } + return response; + }, + setUsed: function() { + if (this.nodes.container) { + return $.global(function() { + return window.TCaptcha.clearChallenge(); + }); + } + }, + occupied: function() { + return !!this.nodes.container; + } + }; + +}).call(this); + (function() { var 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; }; @@ -24158,7 +24250,6 @@ QR = (function() { return; } this.posts = []; - this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); }); @@ -24186,7 +24277,9 @@ QR = (function() { return Header.addShortcut('qr', sc, 540); }, initReady: function() { - var config, link, linkBot, navLinksBot, origToggle, prop; + var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; + captchaVersion = $('#t-root') ? 't' : 'v2'; + QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { @@ -24964,8 +25057,11 @@ QR = (function() { if (g.BOARD.ID === 'r9k' && !((ref = post.com) != null ? ref.match(/[a-z-]/i) : void 0)) { err || (err = 'Original comment required.'); } - if (QR.captcha.isEnabled && !(/\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { - captcha = QR.captcha.getOne(!!threadID) || Captcha.cache.request(!!threadID); + if (QR.captcha.isEnabled && !(QR.captcha === Captcha.v2 && /\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { + captcha = QR.captcha.getOne(!!threadID); + if (QR.captcha === Captcha.v2) { + captcha || (captcha = Captcha.cache.request(!!threadID)); + } if (!captcha) { err = 'No valid captcha.'; QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); @@ -25015,13 +25111,21 @@ QR = (function() { }; } cb = function(response) { + var key, val; if (response != null) { QR.currentCaptcha = response; - if (response.challenge != null) { - options.form.append('recaptcha_challenge_field', response.challenge); - options.form.append('recaptcha_response_field', response.response); + if (QR.captcha === Captcha.v2) { + if (response.challenge != null) { + options.form.append('recaptcha_challenge_field', response.challenge); + options.form.append('recaptcha_response_field', response.response); + } else { + options.form.append('g-recaptcha-response', response.response); + } } else { - options.form.append('g-recaptcha-response', response.response); + for (key in response) { + val = response[key]; + options.form.append(key, val); + } } } QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options); @@ -25031,12 +25135,14 @@ QR = (function() { QR.req = { progress: '...', abort: function() { - Captcha.cache.abort(); + if (QR.captcha === Captcha.v2) { + Captcha.cache.abort(); + } return cb = null; } }; captcha(function(response) { - if (Captcha.cache.haveCookie()) { + if (QR.captcha === Captcha.v2 && Captcha.cache.haveCookie()) { if (typeof cb === "function") { cb(); } @@ -25058,7 +25164,7 @@ QR = (function() { return QR.status(); }, response: function() { - var URL, _, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; + var URL, _, base, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; if (this !== QR.req) { return; } @@ -25071,12 +25177,17 @@ QR = (function() { } } else if ((connErr = !this.response || this.response.title !== 'Post successful!')) { err = QR.connectionError(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } } else if (this.status !== 200) { err = "Error " + this.statusText + " (" + this.status + ")"; } + if (!connErr) { + if (typeof (base = QR.captcha).setUsed === "function") { + base.setUsed(); + } + } delete QR.currentCaptcha; if (err) { QR.errorCount = (QR.errorCount || 0) + 1; @@ -25197,7 +25308,7 @@ QR = (function() { if ((oldReq = QR.req) && !QR.req.isUploadFinished) { delete QR.req; oldReq.abort(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } delete QR.currentCaptcha; @@ -26003,7 +26114,9 @@ QR = (function() { } this.nodes.span.textContent = this.com; QR.captcha.moreNeeded(); - return Captcha.cache.prerequest(); + if (QR.captcha === Captcha.v2) { + return Captcha.cache.prerequest(); + } }; _Class.prototype.isOnlyQuotes = function() { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 30c57bd0a..f63117a4c 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 71ec614d4..6b041566c 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.3 +// @version 1.14.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 40e397241..48513f751 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.3 +// @version 1.14.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -218,7 +218,7 @@ docSet = function() { }; g = { - VERSION: '1.14.21.3', + VERSION: '1.14.21.4', NAMESPACE: '4chan X.', sites: Object.create(null), boards: Object.create(null) @@ -23732,6 +23732,98 @@ Captcha = {}; }).call(this); +(function() { + Captcha.t = { + init: function() { + var root; + if (d.cookie.indexOf('pass_enabled=1') >= 0) { + return; + } + if (!(this.isEnabled = !!$('#t-root') || !$.id('postForm'))) { + return; + } + root = $.el('div', { + className: 'captcha-root' + }); + this.nodes = { + root: root + }; + $.addClass(QR.nodes.el, 'has-captcha', 'captcha-t'); + return $.after(QR.nodes.com.parentNode, root); + }, + moreNeeded: function() {}, + setup: function(focus) { + var boardID, threadID; + if (!this.isEnabled) { + return; + } + if (!this.nodes.container) { + this.nodes.container = $.el('div', { + className: 'captcha-container' + }); + $.prepend(this.nodes.root, this.nodes.container); + boardID = g.BOARD.ID; + threadID = '' + QR.posts[0].thread; + $.global(function() { + var el; + el = document.querySelector('#qr .captcha-container'); + window.TCaptcha.init(el, this.boardID, +this.threadID); + return window.TCaptcha.setErrorCb(function(err) { + return window.dispatchEvent(new CustomEvent('CreateNotification', { + detail: { + type: 'warning', + content: '' + err + } + })); + }); + }, { + boardID: boardID, + threadID: threadID + }); + } + if (focus) { + return $('#t-resp').focus(); + } + }, + destroy: function() { + if (!(this.isEnabled && this.nodes.container)) { + return; + } + $.global(function() { + return window.TCaptcha.destroy(); + }); + $.rm(this.nodes.container); + return delete this.nodes.container; + }, + getOne: function() { + var i, key, len, ref, response; + response = {}; + if (this.nodes.container) { + ref = ['t-response', 't-challenge']; + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + response[key] = $("[name='" + key + "']", this.nodes.container).value; + } + } + if (!response['t-response']) { + response = null; + } + return response; + }, + setUsed: function() { + if (this.nodes.container) { + return $.global(function() { + return window.TCaptcha.clearChallenge(); + }); + } + }, + occupied: function() { + return !!this.nodes.container; + } + }; + +}).call(this); + (function() { var 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; }; @@ -24158,7 +24250,6 @@ QR = (function() { return; } this.posts = []; - this.captcha = Captcha.v2; $.on(d, '4chanXInitFinished', function() { return BoardConfig.ready(QR.initReady); }); @@ -24186,7 +24277,9 @@ QR = (function() { return Header.addShortcut('qr', sc, 540); }, initReady: function() { - var config, link, linkBot, navLinksBot, origToggle, prop; + var captchaVersion, config, link, linkBot, navLinksBot, origToggle, prop; + captchaVersion = $('#t-root') ? 't' : 'v2'; + QR.captcha = Captcha[captchaVersion]; QR.postingIsEnabled = true; config = g.BOARD.config; prop = function(key, def) { @@ -24964,8 +25057,11 @@ QR = (function() { if (g.BOARD.ID === 'r9k' && !((ref = post.com) != null ? ref.match(/[a-z-]/i) : void 0)) { err || (err = 'Original comment required.'); } - if (QR.captcha.isEnabled && !(/\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { - captcha = QR.captcha.getOne(!!threadID) || Captcha.cache.request(!!threadID); + if (QR.captcha.isEnabled && !(QR.captcha === Captcha.v2 && /\b_ct=/.test(d.cookie) && threadID) && !(err && !force)) { + captcha = QR.captcha.getOne(!!threadID); + if (QR.captcha === Captcha.v2) { + captcha || (captcha = Captcha.cache.request(!!threadID)); + } if (!captcha) { err = 'No valid captcha.'; QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); @@ -25015,13 +25111,21 @@ QR = (function() { }; } cb = function(response) { + var key, val; if (response != null) { QR.currentCaptcha = response; - if (response.challenge != null) { - options.form.append('recaptcha_challenge_field', response.challenge); - options.form.append('recaptcha_response_field', response.response); + if (QR.captcha === Captcha.v2) { + if (response.challenge != null) { + options.form.append('recaptcha_challenge_field', response.challenge); + options.form.append('recaptcha_response_field', response.response); + } else { + options.form.append('g-recaptcha-response', response.response); + } } else { - options.form.append('g-recaptcha-response', response.response); + for (key in response) { + val = response[key]; + options.form.append(key, val); + } } } QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options); @@ -25031,12 +25135,14 @@ QR = (function() { QR.req = { progress: '...', abort: function() { - Captcha.cache.abort(); + if (QR.captcha === Captcha.v2) { + Captcha.cache.abort(); + } return cb = null; } }; captcha(function(response) { - if (Captcha.cache.haveCookie()) { + if (QR.captcha === Captcha.v2 && Captcha.cache.haveCookie()) { if (typeof cb === "function") { cb(); } @@ -25058,7 +25164,7 @@ QR = (function() { return QR.status(); }, response: function() { - var URL, _, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; + var URL, _, base, connErr, err, h1, isReply, j, lastPostToThread, len, m, mi, open, post, postID, postsCount, ref, ref1, ref2, ref3, seconds, threadID; if (this !== QR.req) { return; } @@ -25071,12 +25177,17 @@ QR = (function() { } } else if ((connErr = !this.response || this.response.title !== 'Post successful!')) { err = QR.connectionError(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } } else if (this.status !== 200) { err = "Error " + this.statusText + " (" + this.status + ")"; } + if (!connErr) { + if (typeof (base = QR.captcha).setUsed === "function") { + base.setUsed(); + } + } delete QR.currentCaptcha; if (err) { QR.errorCount = (QR.errorCount || 0) + 1; @@ -25197,7 +25308,7 @@ QR = (function() { if ((oldReq = QR.req) && !QR.req.isUploadFinished) { delete QR.req; oldReq.abort(); - if (QR.currentCaptcha) { + if (QR.captcha === Captcha.v2 && QR.currentCaptcha) { Captcha.cache.save(QR.currentCaptcha); } delete QR.currentCaptcha; @@ -26003,7 +26114,9 @@ QR = (function() { } this.nodes.span.textContent = this.com; QR.captcha.moreNeeded(); - return Captcha.cache.prerequest(); + if (QR.captcha === Captcha.v2) { + return Captcha.cache.prerequest(); + } }; _Class.prototype.isOnlyQuotes = function() { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index f908ce4c6..3690dbff3 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 fbf5149d4..f41210366 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.3", + "version": "1.14.21.4", "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 513cc85d0..cd4cabbc5 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 75215e77d..b45351391 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.21.3", + "version": "1.14.21.4", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index 1117a6594..a64532dc9 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 2867a2ecf..14d51d78b 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.21.3", - "date": "2021-05-07T07:49:08.122Z" + "version": "1.14.21.4", + "date": "2021-07-05T20:23:27.050Z" } \ No newline at end of file