Release 4chan X v1.10.10.0.

This commit is contained in:
ccd0 2015-04-18 00:46:09 -07:00
parent bb91393b36
commit c1f6b249b2
13 changed files with 390 additions and 75 deletions

View File

@ -2,6 +2,13 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
### v1.10.10
**v1.10.10.0** *(2015-04-18)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.10.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.10.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.10.9.4.
- Make images in image captcha selectable with arrow keys.
- Add `Captcha Fixes` option (on by default) to control whether 4chan X runs inside the Javascript-based captcha.
### v1.10.9
**v1.10.9.4** *(2015-04-17)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.9.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.9.4/builds/4chan-X-noupdate.crx "Chromium version")]

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
// @version 1.10.9.4
// @version 1.10.10.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -11,6 +11,7 @@
// @match *://a.4cdn.org/*
// @match *://i.4cdn.org/*
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
// @grant GM_getValue
// @grant GM_setValue

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
// @version 1.10.9.4
// @version 1.10.10.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -12,6 +12,7 @@
// @match *://a.4cdn.org/*
// @match *://i.4cdn.org/*
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
// @grant GM_getValue
// @grant GM_setValue
@ -236,7 +237,8 @@
'Force Noscript Captcha': [false, 'Use the non-Javascript fallback captcha in the QR even if Javascript is enabled.', 1],
'Auto-load captcha': [false, 'Automatically load the captcha in the QR even if your post is empty.', 1],
'Post on Captcha Completion': [false, 'Submit the post immediately when the captcha is completed.', 1],
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1]
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1],
'Captcha Fixes': [true, 'Make captcha more keyboard-navigable.']
},
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -397,7 +399,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.9.4',
VERSION: '1.10.10.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -628,9 +630,11 @@
$.addStyle = function(css, id, test) {
var style;
style = $.el('style', {
id: id,
textContent: css
});
if (id != null) {
style.id = id;
}
$.asap((function() {
return d.head && ((test == null) || test());
}), function() {
@ -7599,6 +7603,106 @@
Captcha = {};
Captcha.fixes = {
selectors: {
image: '.rc-imageselect-target > .rc-imageselect-tile > img'
},
init: function() {
switch (location.pathname.split('/')[3]) {
case 'anchor':
return this.initMain();
case 'frame':
return this.initPopup();
}
},
initMain: function() {
return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
return checkbox.focus();
}
};
focus();
return $.on(window, 'focus', function() {
return $.queueTask(focus);
});
});
},
initPopup: function() {
$.addStyle(this.selectors.image + ":focus {outline: 2px solid #4a90e2;}");
this.fixImages();
new MutationObserver((function(_this) {
return function() {
return _this.fixImages();
};
})(this)).observe(d.body, {
childList: true,
subtree: true
});
return $.on(d, 'keydown', this.keybinds.bind(this));
},
fixImages: function() {
var focus, img, k, len1, ref;
if (!(this.images = $$(this.selectors.image)).length) {
return;
}
focus = this.images[0].tabIndex !== 0;
ref = this.images;
for (k = 0, len1 = ref.length; k < len1; k++) {
img = ref[k];
img.tabIndex = 0;
}
if (focus) {
return this.focusImage();
}
},
focusImage: function() {
var img;
img = this.images[0];
return $.asap(function() {
if (!doc.contains(img)) {
return true;
}
img.focus();
return d.activeElement === img;
}, function() {});
},
keybinds: function(e) {
var dx, reload, verify, x;
if (!(this.images && doc.contains(this.images[0]) && d.activeElement)) {
return;
}
reload = $.id('recaptcha-reload-button');
verify = $.id('recaptcha-verify-button');
x = this.images.indexOf(d.activeElement);
if (x < 0) {
if (!$('.rc-controls').contains(d.activeElement)) {
return;
}
x = d.activeElement === verify ? 11 : 9;
}
if (!(dx = {
38: 9,
40: 3,
37: 11,
39: 1
}[e.keyCode])) {
return;
}
x = (x + dx) % 12;
if (x === 10) {
x = dx === 11 ? 9 : 11;
}
(this.images[x] || {
9: reload,
11: verify
}[x]).focus();
e.preventDefault();
return e.stopPropagation();
}
};
Captcha.noscript = {
lifetime: 2 * $.MINUTE,
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
@ -7958,20 +8062,6 @@
};
})(this));
},
initFrame: function() {
$.globalEval('window.focus = function() {};');
return $.on(window, 'focus', function() {
return $.queueTask(function() {
var checkbox;
if (!(d.hasFocus() && (checkbox = $.id('recaptcha-anchor')))) {
return;
}
if (d.activeElement !== checkbox) {
return checkbox.focus();
}
});
});
},
shouldFocus: false,
timeouts: {},
postsCount: 0,
@ -16071,12 +16161,24 @@
Main = {
init: function() {
var db, flatten, k, len1, pathname, ref, ref1, ref2, type;
var db, flatten, k, len1, pathname, ref, ref1, ref2;
if (location.hostname === 'www.google.com') {
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
return $.ready(function() {
return Captcha[type].initFrame();
});
if (location.pathname === '/recaptcha/api/fallback') {
$.ready(function() {
return Captcha.noscript.initFrame();
});
} else {
$.get('Captcha Fixes', true, function(arg) {
var enabled;
enabled = arg['Captcha Fixes'];
if (enabled) {
return $.ready(function() {
return Captcha.fixes.init();
});
}
});
}
return;
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.10.9.4
// @version 1.10.10.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -12,6 +12,7 @@
// @match *://a.4cdn.org/*
// @match *://i.4cdn.org/*
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
// @grant GM_getValue
// @grant GM_setValue
@ -235,7 +236,8 @@
'Force Noscript Captcha': [false, 'Use the non-Javascript fallback captcha in the QR even if Javascript is enabled.', 1],
'Auto-load captcha': [false, 'Automatically load the captcha in the QR even if your post is empty.', 1],
'Post on Captcha Completion': [false, 'Submit the post immediately when the captcha is completed.', 1],
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1]
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1],
'Captcha Fixes': [true, 'Make captcha more keyboard-navigable.']
},
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -396,7 +398,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.9.4',
VERSION: '1.10.10.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -627,9 +629,11 @@
$.addStyle = function(css, id, test) {
var style;
style = $.el('style', {
id: id,
textContent: css
});
if (id != null) {
style.id = id;
}
$.asap((function() {
return d.head && ((test == null) || test());
}), function() {
@ -7598,6 +7602,106 @@
Captcha = {};
Captcha.fixes = {
selectors: {
image: '.rc-imageselect-target > .rc-imageselect-tile > img'
},
init: function() {
switch (location.pathname.split('/')[3]) {
case 'anchor':
return this.initMain();
case 'frame':
return this.initPopup();
}
},
initMain: function() {
return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
return checkbox.focus();
}
};
focus();
return $.on(window, 'focus', function() {
return $.queueTask(focus);
});
});
},
initPopup: function() {
$.addStyle(this.selectors.image + ":focus {outline: 2px solid #4a90e2;}");
this.fixImages();
new MutationObserver((function(_this) {
return function() {
return _this.fixImages();
};
})(this)).observe(d.body, {
childList: true,
subtree: true
});
return $.on(d, 'keydown', this.keybinds.bind(this));
},
fixImages: function() {
var focus, img, k, len1, ref;
if (!(this.images = $$(this.selectors.image)).length) {
return;
}
focus = this.images[0].tabIndex !== 0;
ref = this.images;
for (k = 0, len1 = ref.length; k < len1; k++) {
img = ref[k];
img.tabIndex = 0;
}
if (focus) {
return this.focusImage();
}
},
focusImage: function() {
var img;
img = this.images[0];
return $.asap(function() {
if (!doc.contains(img)) {
return true;
}
img.focus();
return d.activeElement === img;
}, function() {});
},
keybinds: function(e) {
var dx, reload, verify, x;
if (!(this.images && doc.contains(this.images[0]) && d.activeElement)) {
return;
}
reload = $.id('recaptcha-reload-button');
verify = $.id('recaptcha-verify-button');
x = this.images.indexOf(d.activeElement);
if (x < 0) {
if (!$('.rc-controls').contains(d.activeElement)) {
return;
}
x = d.activeElement === verify ? 11 : 9;
}
if (!(dx = {
38: 9,
40: 3,
37: 11,
39: 1
}[e.keyCode])) {
return;
}
x = (x + dx) % 12;
if (x === 10) {
x = dx === 11 ? 9 : 11;
}
(this.images[x] || {
9: reload,
11: verify
}[x]).focus();
e.preventDefault();
return e.stopPropagation();
}
};
Captcha.noscript = {
lifetime: 2 * $.MINUTE,
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
@ -7957,20 +8061,6 @@
};
})(this));
},
initFrame: function() {
$.globalEval('window.focus = function() {};');
return $.on(window, 'focus', function() {
return $.queueTask(function() {
var checkbox;
if (!(d.hasFocus() && (checkbox = $.id('recaptcha-anchor')))) {
return;
}
if (d.activeElement !== checkbox) {
return checkbox.focus();
}
});
});
},
shouldFocus: false,
timeouts: {},
postsCount: 0,
@ -16070,12 +16160,24 @@
Main = {
init: function() {
var db, flatten, k, len1, pathname, ref, ref1, ref2, type;
var db, flatten, k, len1, pathname, ref, ref1, ref2;
if (location.hostname === 'www.google.com') {
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
return $.ready(function() {
return Captcha[type].initFrame();
});
if (location.pathname === '/recaptcha/api/fallback') {
$.ready(function() {
return Captcha.noscript.initFrame();
});
} else {
$.get('Captcha Fixes', true, function(arg) {
var enabled;
enabled = arg['Captcha Fixes'];
if (enabled) {
return $.ready(function() {
return Captcha.fixes.init();
});
}
});
}
return;
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
// @version 1.10.9.4
// @version 1.10.10.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -11,6 +11,7 @@
// @match *://a.4cdn.org/*
// @match *://i.4cdn.org/*
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
// @grant GM_getValue
// @grant GM_setValue

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.10.9.4
// @version 1.10.10.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -12,6 +12,7 @@
// @match *://a.4cdn.org/*
// @match *://i.4cdn.org/*
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
// @grant GM_getValue
// @grant GM_setValue
@ -236,7 +237,8 @@
'Force Noscript Captcha': [false, 'Use the non-Javascript fallback captcha in the QR even if Javascript is enabled.', 1],
'Auto-load captcha': [false, 'Automatically load the captcha in the QR even if your post is empty.', 1],
'Post on Captcha Completion': [false, 'Submit the post immediately when the captcha is completed.', 1],
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1]
'Bottom QR Link': [true, 'Places a link on the bottom of threads to open the QR.', 1],
'Captcha Fixes': [true, 'Make captcha more keyboard-navigable.']
},
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -397,7 +399,7 @@
doc = d.documentElement;
g = {
VERSION: '1.10.9.4',
VERSION: '1.10.10.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -628,9 +630,11 @@
$.addStyle = function(css, id, test) {
var style;
style = $.el('style', {
id: id,
textContent: css
});
if (id != null) {
style.id = id;
}
$.asap((function() {
return d.head && ((test == null) || test());
}), function() {
@ -7599,6 +7603,106 @@
Captcha = {};
Captcha.fixes = {
selectors: {
image: '.rc-imageselect-target > .rc-imageselect-tile > img'
},
init: function() {
switch (location.pathname.split('/')[3]) {
case 'anchor':
return this.initMain();
case 'frame':
return this.initPopup();
}
},
initMain: function() {
return $.onExists(d.body, '#recaptcha-anchor', true, function(checkbox) {
var focus;
focus = function() {
if (d.hasFocus() && d.activeElement !== checkbox) {
return checkbox.focus();
}
};
focus();
return $.on(window, 'focus', function() {
return $.queueTask(focus);
});
});
},
initPopup: function() {
$.addStyle(this.selectors.image + ":focus {outline: 2px solid #4a90e2;}");
this.fixImages();
new MutationObserver((function(_this) {
return function() {
return _this.fixImages();
};
})(this)).observe(d.body, {
childList: true,
subtree: true
});
return $.on(d, 'keydown', this.keybinds.bind(this));
},
fixImages: function() {
var focus, img, k, len1, ref;
if (!(this.images = $$(this.selectors.image)).length) {
return;
}
focus = this.images[0].tabIndex !== 0;
ref = this.images;
for (k = 0, len1 = ref.length; k < len1; k++) {
img = ref[k];
img.tabIndex = 0;
}
if (focus) {
return this.focusImage();
}
},
focusImage: function() {
var img;
img = this.images[0];
return $.asap(function() {
if (!doc.contains(img)) {
return true;
}
img.focus();
return d.activeElement === img;
}, function() {});
},
keybinds: function(e) {
var dx, reload, verify, x;
if (!(this.images && doc.contains(this.images[0]) && d.activeElement)) {
return;
}
reload = $.id('recaptcha-reload-button');
verify = $.id('recaptcha-verify-button');
x = this.images.indexOf(d.activeElement);
if (x < 0) {
if (!$('.rc-controls').contains(d.activeElement)) {
return;
}
x = d.activeElement === verify ? 11 : 9;
}
if (!(dx = {
38: 9,
40: 3,
37: 11,
39: 1
}[e.keyCode])) {
return;
}
x = (x + dx) % 12;
if (x === 10) {
x = dx === 11 ? 9 : 11;
}
(this.images[x] || {
9: reload,
11: verify
}[x]).focus();
e.preventDefault();
return e.stopPropagation();
}
};
Captcha.noscript = {
lifetime: 2 * $.MINUTE,
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
@ -7958,20 +8062,6 @@
};
})(this));
},
initFrame: function() {
$.globalEval('window.focus = function() {};');
return $.on(window, 'focus', function() {
return $.queueTask(function() {
var checkbox;
if (!(d.hasFocus() && (checkbox = $.id('recaptcha-anchor')))) {
return;
}
if (d.activeElement !== checkbox) {
return checkbox.focus();
}
});
});
},
shouldFocus: false,
timeouts: {},
postsCount: 0,
@ -16071,12 +16161,24 @@
Main = {
init: function() {
var db, flatten, k, len1, pathname, ref, ref1, ref2, type;
var db, flatten, k, len1, pathname, ref, ref1, ref2;
if (location.hostname === 'www.google.com') {
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
return $.ready(function() {
return Captcha[type].initFrame();
});
if (location.pathname === '/recaptcha/api/fallback') {
$.ready(function() {
return Captcha.noscript.initFrame();
});
} else {
$.get('Captcha Fixes', true, function(arg) {
var enabled;
enabled = arg['Captcha Fixes'];
if (enabled) {
return $.ready(function() {
return Captcha.fixes.init();
});
}
});
}
return;
}
g.threads = new SimpleDict();
g.posts = new SimpleDict();

Binary file not shown.

View File

@ -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://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.9.4' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.10.0' />
</app>
</gupdate>

View File

@ -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://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.9.4' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.10.0' />
</app>
</gupdate>

View File

@ -3,8 +3,8 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
"version": "1.10.9.4",
"date": "2015-04-18T05:25:53.700Z",
"version": "1.10.10.0",
"date": "2015-04-18T07:45:01.778Z",
"repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/",