diff --git a/CHANGELOG.md b/CHANGELOG.md index 89fb77ad8..c1a320e56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.17 +**v1.11.17.9** *(2015-11-24)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.17.9/builds/4chan-X-noupdate.crx "Chromium version")] +- Support solving 4x4 image captchas with keys in 7-0-/-M square. + **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. diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index c9c4f2f1f..e3f418bdf 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -221,6 +221,10 @@ Keybinds = 'Comma' when 190 'Period' + when 191 + 'Slash' + when 59, 186 + 'Semicolon' else if 48 <= kc <= 57 or 65 <= kc <= 90 # 0-9, A-Z String.fromCharCode(kc).toLowerCase() diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index 033f5e2c0..4b26e5624 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -1,5 +1,6 @@ Captcha.fixes = imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']) + imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']) css: ''' .rc-imageselect-target > div:focus { @@ -82,6 +83,7 @@ Captcha.fixes = for img in @images img.tabIndex = 0 @addTooltips @images if @images.length is 9 + @addTooltips16 @images if @images.length is 16 @complaintLinks() complaintLinks: -> @@ -111,6 +113,11 @@ Captcha.fixes = node.title = "#{@imageKeys[i]} or #{@imageKeys[i+9][0].toUpperCase()}#{@imageKeys[i+9][1..]}" return + addTooltips16: (nodes) -> + for node, i in nodes + node.title = "#{@imageKeys16[i][0].toUpperCase()}#{@imageKeys16[i][1..]}" + return + checkForm: (e) -> n = 0 n++ for checkbox in @images when checkbox.checked @@ -134,6 +141,9 @@ Captcha.fixes = else if n is 9 and (i = @imageKeys.indexOf key) >= 0 @images[i % 9].click() verify.focus() + else if n is 16 and (i = @imageKeys16.indexOf key) >= 0 + @images[i].click() + verify.focus() else if dx = {'Up': n, 'Down': w, 'Left': last, 'Right': 1}[key] x = (x + dx) % (n + w) if n < x < last