diff --git a/CHANGELOG.md b/CHANGELOG.md index 0473990a4..fae924fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.17 +**v1.11.17.8** *(2015-11-20)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.8/builds/4chan-X-noupdate.crx "Chromium version")] +- A few more captcha focusing tweaks. + **v1.11.17.7** *(2015-11-20)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.7/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.7/builds/4chan-X-noupdate.crx "Chromium version")] - More captcha tweaks / fixes. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index a02b2048e..c559e7884 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 4bbc57c7b..3006345e5 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.11.17.7 +// @version 1.11.17.8 // @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 338fd3fdc..62f3827b8 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.11.17.7 +// @version 1.11.17.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.17.7', + VERSION: '1.11.17.8', NAMESPACE: '4chan X.', boards: {} }; @@ -7714,7 +7714,7 @@ captcha = QR.captcha.getOne(); if (!captcha) { err = 'No valid captcha.'; - QR.captcha.setup(true); + QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); } } QR.cleanNotifications(); @@ -7851,7 +7851,7 @@ } else { QR.cooldown.auto = false; } - QR.captcha.setup(QR.cooldown.auto); + QR.captcha.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status); if (QR.captcha.isEnabled && !QR.captcha.captchas.length) { QR.cooldown.auto = false; } @@ -8298,12 +8298,11 @@ onNewPost: function() {}, onPostChange: function() {}, setup: function(focus, force) { - var ref; if (!(this.isEnabled && (force || this.needed()))) { return; } this.create(); - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { return this.nodes.input.focus(); } }, @@ -8592,11 +8591,11 @@ } }, setup: function(focus, force) { - var iframe, ref; + var iframe; if (!(this.isEnabled && (this.needed() || force))) { return; } - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { this.nodes.counter.focus(); } if (this.timeouts.destroy) { @@ -8773,7 +8772,7 @@ this.captchas = this.captchas.slice(i); this.count(); $.set('captchas', this.captchas); - return this.setup(true); + return this.setup(d.activeElement === QR.nodes.status); }, count: function() { this.nodes.counter.textContent = "Captchas: " + this.captchas.length; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 16ae169fd..9765986b5 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 ede5a58c7..570728297 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.17.7 +// @version 1.11.17.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.17.7', + VERSION: '1.11.17.8', NAMESPACE: '4chan X.', boards: {} }; @@ -7714,7 +7714,7 @@ captcha = QR.captcha.getOne(); if (!captcha) { err = 'No valid captcha.'; - QR.captcha.setup(true); + QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); } } QR.cleanNotifications(); @@ -7851,7 +7851,7 @@ } else { QR.cooldown.auto = false; } - QR.captcha.setup(QR.cooldown.auto); + QR.captcha.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status); if (QR.captcha.isEnabled && !QR.captcha.captchas.length) { QR.cooldown.auto = false; } @@ -8298,12 +8298,11 @@ onNewPost: function() {}, onPostChange: function() {}, setup: function(focus, force) { - var ref; if (!(this.isEnabled && (force || this.needed()))) { return; } this.create(); - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { return this.nodes.input.focus(); } }, @@ -8592,11 +8591,11 @@ } }, setup: function(focus, force) { - var iframe, ref; + var iframe; if (!(this.isEnabled && (this.needed() || force))) { return; } - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { this.nodes.counter.focus(); } if (this.timeouts.destroy) { @@ -8773,7 +8772,7 @@ this.captchas = this.captchas.slice(i); this.count(); $.set('captchas', this.captchas); - return this.setup(true); + return this.setup(d.activeElement === QR.nodes.status); }, count: function() { this.nodes.counter.textContent = "Captchas: " + this.captchas.length; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index e6730a4ca..8188f7656 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 5874149cc..0f2367ef9 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.17.7 +// @version 1.11.17.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 741752aa5..dd59e01c2 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.11.17.7 +// @version 1.11.17.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -433,7 +433,7 @@ doc = d.documentElement; g = { - VERSION: '1.11.17.7', + VERSION: '1.11.17.8', NAMESPACE: '4chan X.', boards: {} }; @@ -7714,7 +7714,7 @@ captcha = QR.captcha.getOne(); if (!captcha) { err = 'No valid captcha.'; - QR.captcha.setup(true); + QR.captcha.setup(!QR.cooldown.auto || d.activeElement === QR.nodes.status); } } QR.cleanNotifications(); @@ -7851,7 +7851,7 @@ } else { QR.cooldown.auto = false; } - QR.captcha.setup(QR.cooldown.auto); + QR.captcha.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status); if (QR.captcha.isEnabled && !QR.captcha.captchas.length) { QR.cooldown.auto = false; } @@ -8298,12 +8298,11 @@ onNewPost: function() {}, onPostChange: function() {}, setup: function(focus, force) { - var ref; if (!(this.isEnabled && (force || this.needed()))) { return; } this.create(); - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { return this.nodes.input.focus(); } }, @@ -8592,11 +8591,11 @@ } }, setup: function(focus, force) { - var iframe, ref; + var iframe; if (!(this.isEnabled && (this.needed() || force))) { return; } - if (focus && ((ref = d.activeElement) === QR.nodes.status || ref === d.body)) { + if (focus) { this.nodes.counter.focus(); } if (this.timeouts.destroy) { @@ -8773,7 +8772,7 @@ this.captchas = this.captchas.slice(i); this.count(); $.set('captchas', this.captchas); - return this.setup(true); + return this.setup(d.activeElement === QR.nodes.status); }, count: function() { this.nodes.counter.textContent = "Captchas: " + this.captchas.length; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 30508dd33..6d59eb4d1 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index 6e5e77204..41bd1209b 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index 202513669..ed1e0607b 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/src/Posting/Captcha.v1.coffee b/src/Posting/Captcha.v1.coffee index 9a438d0a0..aa50aa354 100644 --- a/src/Posting/Captcha.v1.coffee +++ b/src/Posting/Captcha.v1.coffee @@ -95,7 +95,7 @@ Captcha.v1 = setup: (focus, force) -> return unless @isEnabled and (force or @needed()) @create() - @nodes.input.focus() if focus and d.activeElement in [QR.nodes.status, d.body] + @nodes.input.focus() if focus afterSetup: -> return unless challenge = $.id 'recaptcha_challenge_field_holder' diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 678bfb226..881426868 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -66,7 +66,7 @@ Captcha.v2 = setup: (focus, force) -> return unless @isEnabled and (@needed() or force) - @nodes.counter.focus() if focus and d.activeElement in [QR.nodes.status, d.body] + @nodes.counter.focus() if focus if @timeouts.destroy clearTimeout @timeouts.destroy delete @timeouts.destroy @@ -209,7 +209,7 @@ Captcha.v2 = @captchas = @captchas[i..] @count() $.set 'captchas', @captchas - @setup true + @setup(d.activeElement is QR.nodes.status) count: -> @nodes.counter.textContent = "Captchas: #{@captchas.length}" diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index c3d2d712b..6e79f28b5 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -632,7 +632,7 @@ QR = captcha = QR.captcha.getOne() unless captcha err = 'No valid captcha.' - QR.captcha.setup true + QR.captcha.setup(!QR.cooldown.auto or d.activeElement is QR.nodes.status) QR.cleanNotifications() if err @@ -768,7 +768,7 @@ QR = QR.cooldown.addDelay post, seconds else # stop auto-posting QR.cooldown.auto = false - QR.captcha.setup QR.cooldown.auto + QR.captcha.setup(QR.cooldown.auto and d.activeElement is QR.nodes.status) QR.cooldown.auto = false if QR.captcha.isEnabled and !QR.captcha.captchas.length QR.status() QR.error err diff --git a/version.json b/version.json index 8d120578d..9abc458ba 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.17.7", - "date": "2015-11-20T20:41:27.482Z" + "version": "1.11.17.8", + "date": "2015-11-21T02:46:47.553Z" }