Display message when noscript captcha is disabled. #2500

This commit is contained in:
ccd0 2019-12-19 12:57:55 -08:00
parent 4dfc6c2346
commit f595c1ed68
2 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,8 @@ Captcha.fixes =
{token}
else if $('.fbc-imageselect-challenge > form')
{working: true}
else if (ns = $ 'noscript') and /please enable javascript/i.test(ns.textContent)
{disabled: true}
else
null
new Connection(window.parent, '*').send data if data

View File

@ -47,3 +47,7 @@ Captcha.replace =
break if (textarea = $ 'textarea', node)
textarea.value = token
$.event 'input', null, textarea
disabled: ->
msg = $.el 'div',
<%= html('Noscript captcha seems to be disabled on 4chan.<br>You may be able to post if you uncheck &quot;Force Noscript Captcha&quot; in your settings.') %>
new Notice 'warning', msg