diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 9b57320e9..41457b66a 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -8782,6 +8782,7 @@ } if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { QR.captcha.nodes.input.focus(); + QR.captcha.setup(); if (Conf['Captcha Warning Notifications'] && !d.hidden) { QR.notify(el); } else { @@ -9493,10 +9494,6 @@ if (!(Conf['Persistent QR'] || QR.cooldown.auto)) { QR.close(); } else { - if (QR.posts.length > 1) { - QR.captcha.setup(); - QR.captcha.afterSetup(); - } post.rm(); } QR.cooldown.set({ @@ -9955,6 +9952,9 @@ $.rmClass(QR.nodes.el, 'dump'); } else if (this === QR.selected) { (QR.posts[index - 1] || QR.posts[index + 1]).select(); + if (QR.captcha.isEnabled) { + QR.captcha.setup(); + } } QR.posts.splice(index, 1); return QR.status(); diff --git a/builds/crx/script.js b/builds/crx/script.js index 39dbca237..ff11127ca 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -8836,6 +8836,7 @@ } if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { QR.captcha.nodes.input.focus(); + QR.captcha.setup(); if (Conf['Captcha Warning Notifications'] && !d.hidden) { QR.notify(el); } else { @@ -9537,10 +9538,6 @@ if (!(Conf['Persistent QR'] || QR.cooldown.auto)) { QR.close(); } else { - if (QR.posts.length > 1) { - QR.captcha.setup(); - QR.captcha.afterSetup(); - } post.rm(); } QR.cooldown.set({ @@ -9993,6 +9990,9 @@ $.rmClass(QR.nodes.el, 'dump'); } else if (this === QR.selected) { (QR.posts[index - 1] || QR.posts[index + 1]).select(); + if (QR.captcha.isEnabled) { + QR.captcha.setup(); + } } QR.posts.splice(index, 1); return QR.status(); diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index d3dc4664d..2c61cf8e2 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -139,6 +139,7 @@ QR = if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent # Focus the captcha input on captcha error. QR.captcha.nodes.input.focus() + QR.captcha.setup() if Conf['Captcha Warning Notifications'] and !d.hidden QR.notify el else @@ -814,9 +815,6 @@ QR = unless Conf['Persistent QR'] or QR.cooldown.auto QR.close() else - if QR.posts.length > 1 - QR.captcha.setup() - QR.captcha.afterSetup() post.rm() QR.cooldown.set {req, post, isReply, threadID} diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 799c17e9f..c1e4d9547 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -80,6 +80,8 @@ QR.post = class $.rmClass QR.nodes.el, 'dump' else if @ is QR.selected (QR.posts[index-1] or QR.posts[index+1]).select() + if QR.captcha.isEnabled + QR.captcha.setup() QR.posts.splice index, 1 QR.status() delete: ->