Release 4chan X v1.10.10.0.
This commit is contained in:
parent
bb91393b36
commit
c1f6b249b2
@ -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).
|
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
|
||||||
|
|
||||||
**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")]
|
**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.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.9.4
|
// @version 1.10.10.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -11,6 +11,7 @@
|
|||||||
// @match *://a.4cdn.org/*
|
// @match *://a.4cdn.org/*
|
||||||
// @match *://i.4cdn.org/*
|
// @match *://i.4cdn.org/*
|
||||||
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
|
// @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
|
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.9.4
|
// @version 1.10.10.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -12,6 +12,7 @@
|
|||||||
// @match *://a.4cdn.org/*
|
// @match *://a.4cdn.org/*
|
||||||
// @match *://i.4cdn.org/*
|
// @match *://i.4cdn.org/*
|
||||||
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
|
// @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
|
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_setValue
|
// @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],
|
'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],
|
'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],
|
'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 Links': {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||||
@ -397,7 +399,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.9.4',
|
VERSION: '1.10.10.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -628,9 +630,11 @@
|
|||||||
$.addStyle = function(css, id, test) {
|
$.addStyle = function(css, id, test) {
|
||||||
var style;
|
var style;
|
||||||
style = $.el('style', {
|
style = $.el('style', {
|
||||||
id: id,
|
|
||||||
textContent: css
|
textContent: css
|
||||||
});
|
});
|
||||||
|
if (id != null) {
|
||||||
|
style.id = id;
|
||||||
|
}
|
||||||
$.asap((function() {
|
$.asap((function() {
|
||||||
return d.head && ((test == null) || test());
|
return d.head && ((test == null) || test());
|
||||||
}), function() {
|
}), function() {
|
||||||
@ -7599,6 +7603,106 @@
|
|||||||
|
|
||||||
Captcha = {};
|
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 = {
|
Captcha.noscript = {
|
||||||
lifetime: 2 * $.MINUTE,
|
lifetime: 2 * $.MINUTE,
|
||||||
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||||
@ -7958,20 +8062,6 @@
|
|||||||
};
|
};
|
||||||
})(this));
|
})(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,
|
shouldFocus: false,
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
postsCount: 0,
|
||||||
@ -16071,12 +16161,24 @@
|
|||||||
|
|
||||||
Main = {
|
Main = {
|
||||||
init: function() {
|
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') {
|
if (location.hostname === 'www.google.com') {
|
||||||
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
|
if (location.pathname === '/recaptcha/api/fallback') {
|
||||||
return $.ready(function() {
|
$.ready(function() {
|
||||||
return Captcha[type].initFrame();
|
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.threads = new SimpleDict();
|
||||||
g.posts = new SimpleDict();
|
g.posts = new SimpleDict();
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.9.4
|
// @version 1.10.10.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -12,6 +12,7 @@
|
|||||||
// @match *://a.4cdn.org/*
|
// @match *://a.4cdn.org/*
|
||||||
// @match *://i.4cdn.org/*
|
// @match *://i.4cdn.org/*
|
||||||
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
|
// @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
|
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_setValue
|
// @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],
|
'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],
|
'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],
|
'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 Links': {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||||
@ -396,7 +398,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.9.4',
|
VERSION: '1.10.10.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -627,9 +629,11 @@
|
|||||||
$.addStyle = function(css, id, test) {
|
$.addStyle = function(css, id, test) {
|
||||||
var style;
|
var style;
|
||||||
style = $.el('style', {
|
style = $.el('style', {
|
||||||
id: id,
|
|
||||||
textContent: css
|
textContent: css
|
||||||
});
|
});
|
||||||
|
if (id != null) {
|
||||||
|
style.id = id;
|
||||||
|
}
|
||||||
$.asap((function() {
|
$.asap((function() {
|
||||||
return d.head && ((test == null) || test());
|
return d.head && ((test == null) || test());
|
||||||
}), function() {
|
}), function() {
|
||||||
@ -7598,6 +7602,106 @@
|
|||||||
|
|
||||||
Captcha = {};
|
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 = {
|
Captcha.noscript = {
|
||||||
lifetime: 2 * $.MINUTE,
|
lifetime: 2 * $.MINUTE,
|
||||||
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||||
@ -7957,20 +8061,6 @@
|
|||||||
};
|
};
|
||||||
})(this));
|
})(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,
|
shouldFocus: false,
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
postsCount: 0,
|
||||||
@ -16070,12 +16160,24 @@
|
|||||||
|
|
||||||
Main = {
|
Main = {
|
||||||
init: function() {
|
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') {
|
if (location.hostname === 'www.google.com') {
|
||||||
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
|
if (location.pathname === '/recaptcha/api/fallback') {
|
||||||
return $.ready(function() {
|
$.ready(function() {
|
||||||
return Captcha[type].initFrame();
|
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.threads = new SimpleDict();
|
||||||
g.posts = new SimpleDict();
|
g.posts = new SimpleDict();
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.9.4
|
// @version 1.10.10.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -11,6 +11,7 @@
|
|||||||
// @match *://a.4cdn.org/*
|
// @match *://a.4cdn.org/*
|
||||||
// @match *://i.4cdn.org/*
|
// @match *://i.4cdn.org/*
|
||||||
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
|
// @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
|
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.9.4
|
// @version 1.10.10.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -12,6 +12,7 @@
|
|||||||
// @match *://a.4cdn.org/*
|
// @match *://a.4cdn.org/*
|
||||||
// @match *://i.4cdn.org/*
|
// @match *://i.4cdn.org/*
|
||||||
// @match https://www.google.com/recaptcha/api2/anchor?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*
|
// @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
|
// @match *://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_setValue
|
// @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],
|
'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],
|
'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],
|
'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 Links': {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||||
@ -397,7 +399,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.9.4',
|
VERSION: '1.10.10.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -628,9 +630,11 @@
|
|||||||
$.addStyle = function(css, id, test) {
|
$.addStyle = function(css, id, test) {
|
||||||
var style;
|
var style;
|
||||||
style = $.el('style', {
|
style = $.el('style', {
|
||||||
id: id,
|
|
||||||
textContent: css
|
textContent: css
|
||||||
});
|
});
|
||||||
|
if (id != null) {
|
||||||
|
style.id = id;
|
||||||
|
}
|
||||||
$.asap((function() {
|
$.asap((function() {
|
||||||
return d.head && ((test == null) || test());
|
return d.head && ((test == null) || test());
|
||||||
}), function() {
|
}), function() {
|
||||||
@ -7599,6 +7603,106 @@
|
|||||||
|
|
||||||
Captcha = {};
|
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 = {
|
Captcha.noscript = {
|
||||||
lifetime: 2 * $.MINUTE,
|
lifetime: 2 * $.MINUTE,
|
||||||
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
iframeURL: '//www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc',
|
||||||
@ -7958,20 +8062,6 @@
|
|||||||
};
|
};
|
||||||
})(this));
|
})(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,
|
shouldFocus: false,
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
postsCount: 0,
|
||||||
@ -16071,12 +16161,24 @@
|
|||||||
|
|
||||||
Main = {
|
Main = {
|
||||||
init: function() {
|
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') {
|
if (location.hostname === 'www.google.com') {
|
||||||
type = location.pathname === '/recaptcha/api/fallback' ? 'noscript' : 'v2';
|
if (location.pathname === '/recaptcha/api/fallback') {
|
||||||
return $.ready(function() {
|
$.ready(function() {
|
||||||
return Captcha[type].initFrame();
|
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.threads = new SimpleDict();
|
||||||
g.posts = new SimpleDict();
|
g.posts = new SimpleDict();
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<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>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<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>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.10.9.4",
|
"version": "1.10.10.0",
|
||||||
"date": "2015-04-18T05:25:53.700Z",
|
"date": "2015-04-18T07:45:01.778Z",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user