diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32d58776f..0473990a4 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.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.
+
**v1.11.17.6** *(2015-11-19)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.6/builds/4chan-X-noupdate.crx "Chromium version")]
- Make use of new HTTPS support on iqdb.org.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index fc8de29de..a02b2048e 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 f973b5144..4bbc57c7b 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.6
+// @version 1.11.17.7
// @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 9e7ceeb05..338fd3fdc 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.6
+// @version 1.11.17.7
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.17.6',
+ VERSION: '1.11.17.7',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7838,10 +7838,10 @@
} else if (/expired/i.test(err.textContent)) {
err = 'This CAPTCHA is no longer valid because it has expired.';
}
- QR.cooldown.auto = QR.captcha.isEnabled ? !!QR.captcha.captchas.length : err === 'Connection error with sys.4chan.org.' ? true : false;
+ QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
QR.cooldown.addDelay(post, 2);
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
- QR.cooldown.auto = (!QR.captcha.isEnabled || !!QR.captcha.captchas.length) && !/have\s+been\s+muted/i.test(err.textContent);
+ QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
seconds = 60 * (+(m[1] || 0)) + (+m[2]);
if (/muted/i.test(err.textContent)) {
QR.cooldown.addMute(seconds);
@@ -7851,9 +7851,12 @@
} else {
QR.cooldown.auto = false;
}
+ QR.captcha.setup(QR.cooldown.auto);
+ if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
+ QR.cooldown.auto = false;
+ }
QR.status();
QR.error(err);
- QR.captcha.setup(true);
return;
}
h1 = $('h1', resDoc);
@@ -7899,7 +7902,7 @@
QR.close();
} else {
post.rm();
- QR.captcha.setup(true);
+ QR.captcha.setup(d.activeElement === QR.nodes.status);
}
QR.cooldown.add(threadID, postID);
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
@@ -8782,6 +8785,9 @@
reload: function() {
if (this.noscript) {
return $('iframe', this.nodes.container).src = this.noscriptURL();
+ } else if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
+ this.destroy();
+ return this.setup(false, true);
} else {
return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();');
}
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 5cde3f81b..16ae169fd 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 ad7bc00dc..ede5a58c7 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.6
+// @version 1.11.17.7
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.17.6',
+ VERSION: '1.11.17.7',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7838,10 +7838,10 @@
} else if (/expired/i.test(err.textContent)) {
err = 'This CAPTCHA is no longer valid because it has expired.';
}
- QR.cooldown.auto = QR.captcha.isEnabled ? !!QR.captcha.captchas.length : err === 'Connection error with sys.4chan.org.' ? true : false;
+ QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
QR.cooldown.addDelay(post, 2);
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
- QR.cooldown.auto = (!QR.captcha.isEnabled || !!QR.captcha.captchas.length) && !/have\s+been\s+muted/i.test(err.textContent);
+ QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
seconds = 60 * (+(m[1] || 0)) + (+m[2]);
if (/muted/i.test(err.textContent)) {
QR.cooldown.addMute(seconds);
@@ -7851,9 +7851,12 @@
} else {
QR.cooldown.auto = false;
}
+ QR.captcha.setup(QR.cooldown.auto);
+ if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
+ QR.cooldown.auto = false;
+ }
QR.status();
QR.error(err);
- QR.captcha.setup(true);
return;
}
h1 = $('h1', resDoc);
@@ -7899,7 +7902,7 @@
QR.close();
} else {
post.rm();
- QR.captcha.setup(true);
+ QR.captcha.setup(d.activeElement === QR.nodes.status);
}
QR.cooldown.add(threadID, postID);
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
@@ -8782,6 +8785,9 @@
reload: function() {
if (this.noscript) {
return $('iframe', this.nodes.container).src = this.noscriptURL();
+ } else if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
+ this.destroy();
+ return this.setup(false, true);
} else {
return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();');
}
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index eba9022e9..e6730a4ca 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 b973a3473..5874149cc 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.6
+// @version 1.11.17.7
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index f8de511aa..741752aa5 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.6
+// @version 1.11.17.7
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.17.6',
+ VERSION: '1.11.17.7',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7838,10 +7838,10 @@
} else if (/expired/i.test(err.textContent)) {
err = 'This CAPTCHA is no longer valid because it has expired.';
}
- QR.cooldown.auto = QR.captcha.isEnabled ? !!QR.captcha.captchas.length : err === 'Connection error with sys.4chan.org.' ? true : false;
+ QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
QR.cooldown.addDelay(post, 2);
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
- QR.cooldown.auto = (!QR.captcha.isEnabled || !!QR.captcha.captchas.length) && !/have\s+been\s+muted/i.test(err.textContent);
+ QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
seconds = 60 * (+(m[1] || 0)) + (+m[2]);
if (/muted/i.test(err.textContent)) {
QR.cooldown.addMute(seconds);
@@ -7851,9 +7851,12 @@
} else {
QR.cooldown.auto = false;
}
+ QR.captcha.setup(QR.cooldown.auto);
+ if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
+ QR.cooldown.auto = false;
+ }
QR.status();
QR.error(err);
- QR.captcha.setup(true);
return;
}
h1 = $('h1', resDoc);
@@ -7899,7 +7902,7 @@
QR.close();
} else {
post.rm();
- QR.captcha.setup(true);
+ QR.captcha.setup(d.activeElement === QR.nodes.status);
}
QR.cooldown.add(threadID, postID);
URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
@@ -8782,6 +8785,9 @@
reload: function() {
if (this.noscript) {
return $('iframe', this.nodes.container).src = this.noscriptURL();
+ } else if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
+ this.destroy();
+ return this.setup(false, true);
} else {
return $.globalEval('(function() {\n var container = document.querySelector("#qr .captcha-container");\n window.grecaptcha.reset(container.dataset.widgetID);\n})();');
}
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index fea220be8..30508dd33 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 674c42f2e..6e5e77204 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 ef2ba42a0..202513669 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee
index fa366d75d..fe847f2c5 100644
--- a/src/Posting/Captcha.v2.coffee
+++ b/src/Posting/Captcha.v2.coffee
@@ -220,6 +220,9 @@ Captcha.v2 =
reload: ->
if @noscript
$('iframe', @nodes.container).src = @noscriptURL()
+ else if $ 'iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', @nodes.container
+ @destroy()
+ @setup false, true
else
$.globalEval '''
(function() {
diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee
index cef65ef6d..b9bcdb6f9 100644
--- a/src/Posting/QR.coffee
+++ b/src/Posting/QR.coffee
@@ -757,20 +757,14 @@ QR =
<%= html('You mistyped the CAPTCHA, or the CAPTCHA malfunctioned [complain here].') %>
else if /expired/i.test err.textContent
err = 'This CAPTCHA is no longer valid because it has expired.'
- # Enable auto-post if we have some cached captchas.
- QR.cooldown.auto = if QR.captcha.isEnabled
- !!QR.captcha.captchas.length
- else if err is 'Connection error with sys.4chan.org.'
- true
- else
- # Something must've gone terribly wrong if you get captcha errors without captchas.
- # Don't auto-post indefinitely in that case.
- false
+ # Something must've gone terribly wrong if you get captcha errors without captchas.
+ # Don't auto-post indefinitely in that case.
+ QR.cooldown.auto = QR.captcha.isEnabled or err is 'Connection error with sys.4chan.org.'
# Too many frequent mistyped captchas will auto-ban you!
# On connection error, the post most likely didn't go through.
QR.cooldown.addDelay post, 2
else if err.textContent and (m = err.textContent.match /(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i) and !/duplicate|hour/i.test(err.textContent)
- QR.cooldown.auto = (!QR.captcha.isEnabled or !!QR.captcha.captchas.length) and !/have\s+been\s+muted/i.test(err.textContent)
+ QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent)
seconds = 60 * (+(m[1]||0)) + (+m[2])
if /muted/i.test err.textContent
QR.cooldown.addMute seconds
@@ -778,9 +772,10 @@ QR =
QR.cooldown.addDelay post, seconds
else # stop auto-posting
QR.cooldown.auto = false
+ QR.captcha.setup QR.cooldown.auto
+ QR.cooldown.auto = false if QR.captcha.isEnabled and !QR.captcha.captchas.length
QR.status()
QR.error err
- QR.captcha.setup true
return
h1 = $ 'h1', resDoc
@@ -818,7 +813,7 @@ QR =
QR.close()
else
post.rm()
- QR.captcha.setup true
+ QR.captcha.setup(d.activeElement is QR.nodes.status)
QR.cooldown.add threadID, postID
diff --git a/version.json b/version.json
index d6349fb26..8d120578d 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.17.6",
- "date": "2015-11-19T22:42:22.721Z"
+ "version": "1.11.17.7",
+ "date": "2015-11-20T20:41:27.482Z"
}