Merge branch 'bstable'

This commit is contained in:
ccd0 2015-11-24 22:03:04 -08:00
commit a1429e3cb0
3 changed files with 17 additions and 0 deletions

View File

@ -20,6 +20,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.17 ### 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")] **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. - A few more captcha focusing tweaks.

View File

@ -221,6 +221,10 @@ Keybinds =
'Comma' 'Comma'
when 190 when 190
'Period' 'Period'
when 191
'Slash'
when 59, 186
'Semicolon'
else else
if 48 <= kc <= 57 or 65 <= kc <= 90 # 0-9, A-Z if 48 <= kc <= 57 or 65 <= kc <= 90 # 0-9, A-Z
String.fromCharCode(kc).toLowerCase() String.fromCharCode(kc).toLowerCase()

View File

@ -1,5 +1,6 @@
Captcha.fixes = Captcha.fixes =
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']) imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period'])
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash'])
css: ''' css: '''
.rc-imageselect-target > div:focus { .rc-imageselect-target > div:focus {
@ -82,6 +83,7 @@ Captcha.fixes =
for img in @images for img in @images
img.tabIndex = 0 img.tabIndex = 0
@addTooltips @images if @images.length is 9 @addTooltips @images if @images.length is 9
@addTooltips16 @images if @images.length is 16
@complaintLinks() @complaintLinks()
complaintLinks: -> complaintLinks: ->
@ -111,6 +113,11 @@ Captcha.fixes =
node.title = "#{@imageKeys[i]} or #{@imageKeys[i+9][0].toUpperCase()}#{@imageKeys[i+9][1..]}" node.title = "#{@imageKeys[i]} or #{@imageKeys[i+9][0].toUpperCase()}#{@imageKeys[i+9][1..]}"
return return
addTooltips16: (nodes) ->
for node, i in nodes
node.title = "#{@imageKeys16[i][0].toUpperCase()}#{@imageKeys16[i][1..]}"
return
checkForm: (e) -> checkForm: (e) ->
n = 0 n = 0
n++ for checkbox in @images when checkbox.checked 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 else if n is 9 and (i = @imageKeys.indexOf key) >= 0
@images[i % 9].click() @images[i % 9].click()
verify.focus() 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] else if dx = {'Up': n, 'Down': w, 'Left': last, 'Right': 1}[key]
x = (x + dx) % (n + w) x = (x + dx) % (n + w)
if n < x < last if n < x < last