Drop complaint and IRC links from captchas. #904
This commit is contained in:
parent
4caa66d556
commit
fcd6ffa8bb
@ -10,23 +10,6 @@ Report =
|
||||
|
||||
Report.archive() if Conf['Archive Report']
|
||||
|
||||
if (passAd = $ 'a[href="https://www.4chan.org/pass"]')
|
||||
$.extend passAd,
|
||||
textContent: 'Complain'
|
||||
href: 'https://www.4chan.org/feedback'
|
||||
tabIndex: -1
|
||||
passAd.parentNode.normalize()
|
||||
if (prev = passAd.previousSibling)?.nodeType is Node.TEXT_NODE
|
||||
prev.nodeValue = prev.nodeValue.replace /4chan Pass[^\.]*\./i, 'reCAPTCHA malfunctioning?'
|
||||
$.after passAd, [
|
||||
$.tn '] ['
|
||||
$.el 'a',
|
||||
href: 'irc://irc.rizon.net/4chan'
|
||||
textContent: '4chan IRC'
|
||||
target: '_blank'
|
||||
tabIndex: -1
|
||||
]
|
||||
|
||||
if not Conf['Use Recaptcha v1 in Reports'] and not Conf['Force Noscript Captcha'] and Main.jsEnabled
|
||||
new MutationObserver(->
|
||||
Report.fit 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'
|
||||
|
||||
@ -94,17 +94,6 @@ Captcha.fixes =
|
||||
@addTooltips @images
|
||||
else
|
||||
@addTooltips16 @images
|
||||
@complaintLinks()
|
||||
|
||||
complaintLinks: ->
|
||||
for errmsg in $$ '.rc-imageselect-incorrect-response, .rc-imageselect-error-select-one, .rc-imageselect-error-select-more, .rc-imageselect-error-dynamic-more'
|
||||
unless $ 'a', errmsg
|
||||
link = $.el 'a',
|
||||
href: 'https://www.4chan.org/feedback'
|
||||
target: '_blank'
|
||||
textContent: '[complain]'
|
||||
$.add errmsg, [$.tn(' '), link]
|
||||
return
|
||||
|
||||
addLabels: ->
|
||||
imageSelect = $ '.fbc-payload-imageselect'
|
||||
|
||||
@ -721,8 +721,7 @@ QR =
|
||||
if /captcha|verification/i.test(err.textContent) or err is 'Connection error with sys.4chan.org.'
|
||||
# Remove the obnoxious 4chan Pass ad.
|
||||
if /mistyped/i.test err.textContent
|
||||
err = $.el 'span',
|
||||
<%= html('You mistyped the CAPTCHA, or the CAPTCHA malfunctioned [<a href="https://www.4chan.org/feedback" target="_blank">complain here</a>].') %>
|
||||
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.'
|
||||
else if /expired/i.test err.textContent
|
||||
err = 'This CAPTCHA is no longer valid because it has expired.'
|
||||
# Something must've gone terribly wrong if you get captcha errors without captchas.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user