Add setting to load captcha when you open the thread, disabled by default

This commit is contained in:
Kabir Sala 2014-02-10 15:22:56 +01:00
parent 1e1afcf2e7
commit 9c5ca585ed
5 changed files with 16 additions and 2 deletions

View File

@ -211,7 +211,8 @@
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
'Auto-load captcha': [false, 'Automatically load the captcha when you open a thread']
},
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -6114,6 +6115,9 @@
if (!(this.isEnabled = !!container)) {
return;
}
if (Conf['Auto-load captcha']) {
$.globalEval('loadRecaptcha()');
}
imgContainer = $.el('div', {
className: 'captcha-img',
title: 'Reload reCAPTCHA',

Binary file not shown.

View File

@ -189,7 +189,8 @@
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
'Auto-load captcha': [false, 'Automatically load the captcha when you open a thread']
},
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -6116,6 +6117,9 @@
if (!(this.isEnabled = !!container)) {
return;
}
if (Conf['Auto-load captcha']) {
$.globalEval('loadRecaptcha()');
}
imgContainer = $.el('div', {
className: 'captcha-img',
title: 'Reload reCAPTCHA',

View File

@ -313,6 +313,10 @@ Config =
true
'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'
]
'Auto-load captcha': [
false
'Automatically load the captcha when you open a thread'
]
'Quote Links':
'Quote Backlinks': [

View File

@ -4,6 +4,8 @@ QR.captcha =
container = $.id 'captchaContainer'
return unless @isEnabled = !!container
$.globalEval 'loadRecaptcha()' if Conf['Auto-load captcha']
imgContainer = $.el 'div',
className: 'captcha-img'
title: 'Reload reCAPTCHA'