Detect when Javascript is disabled on the page and use the noscript captcha.

This commit is contained in:
ccd0 2014-12-13 08:22:06 -08:00
parent e028273eed
commit 274190e6bb

View File

@ -7,7 +7,9 @@ QR =
@db = new DataBoard 'yourPosts'
@posts = []
@captcha = Captcha[if Conf['Force Noscript Captcha'] then 'noscript' else 'v2']
$.globalEval 'document.documentElement.dataset.jsEnabled = true;'
noscript = Conf['Force Noscript Captcha'] or !doc.dataset.jsEnabled
@captcha = Captcha[if noscript then 'noscript' else 'v2']
if Conf['QR Shortcut']
sc = $.el 'a',