Merge branch 'master' into noscript
This commit is contained in:
commit
2d2081c287
@ -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.
|
||||
|
||||
|
||||
Binary file not shown.
@ -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
|
||||
|
||||
@ -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})();');
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -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})();');
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -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
|
||||
|
||||
@ -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})();');
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.17.6' />
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.17.7' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.17.6' />
|
||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.17.7' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -757,20 +757,14 @@ QR =
|
||||
<%= html('You mistyped the CAPTCHA, or the CAPTCHA malfunctioned [<a href="https://www.4chan-x.net/captchas.html" target="_blank">complain here</a>].') %>
|
||||
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
|
||||
|
||||
|
||||
@ -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"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user