Option affects lack of captcha warning as well

This commit is contained in:
Jordan Bates 2013-05-15 06:11:01 -07:00
parent 51dee38f95
commit f91702b984
5 changed files with 12 additions and 12 deletions

View File

@ -198,7 +198,7 @@
'Cooldown': [true, 'Indicate the remaining time before posting again.'], '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.'], '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.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
'Mistyped Captcha Errors': [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.']
}, },
'Quote Links': { 'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'], 'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -4744,7 +4744,7 @@
QR.cleanNotifications(); QR.cleanNotifications();
d.activeElement.blur(); d.activeElement.blur();
$.rmClass(QR.nodes.el, 'dump'); $.rmClass(QR.nodes.el, 'dump');
if (!Conf['Mistyped Captcha Errors']) { if (!Conf['Captcha Warning Notifications']) {
$.rmClass(QR.captcha.nodes.input, 'error'); $.rmClass(QR.captcha.nodes.input, 'error');
} }
if (Conf['QR Shortcut']) { if (Conf['QR Shortcut']) {
@ -4792,7 +4792,7 @@
} }
if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) {
QR.captcha.nodes.input.focus(); QR.captcha.nodes.input.focus();
if (Conf['Mistyped Captcha Errors']) { if (Conf['Captcha Warning Notifications']) {
QR.notifications.push(new Notification('warning', el)); QR.notifications.push(new Notification('warning', el));
} else { } else {
$.addClass(QR.captcha.nodes.input, 'error'); $.addClass(QR.captcha.nodes.input, 'error');

View File

@ -199,7 +199,7 @@
'Cooldown': [true, 'Indicate the remaining time before posting again.'], '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.'], '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.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
'Mistyped Captcha Errors': [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.']
}, },
'Quote Links': { 'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'], 'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -4728,7 +4728,7 @@
QR.cleanNotifications(); QR.cleanNotifications();
d.activeElement.blur(); d.activeElement.blur();
$.rmClass(QR.nodes.el, 'dump'); $.rmClass(QR.nodes.el, 'dump');
if (!Conf['Mistyped Captcha Errors']) { if (!Conf['Captcha Warning Notifications']) {
$.rmClass(QR.captcha.nodes.input, 'error'); $.rmClass(QR.captcha.nodes.input, 'error');
} }
if (Conf['QR Shortcut']) { if (Conf['QR Shortcut']) {
@ -4776,7 +4776,7 @@
} }
if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) {
QR.captcha.nodes.input.focus(); QR.captcha.nodes.input.focus();
if (Conf['Mistyped Captcha Errors']) { if (Conf['Captcha Warning Notifications']) {
QR.notifications.push(new Notification('warning', el)); QR.notifications.push(new Notification('warning', el));
} else { } else {
$.addClass(QR.captcha.nodes.input, 'error'); $.addClass(QR.captcha.nodes.input, 'error');

View File

@ -180,7 +180,7 @@
'Cooldown': [true, 'Indicate the remaining time before posting again.'], '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.'], '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.'], 'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
'Mistyped Captcha Errors': [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.']
}, },
'Quote Links': { 'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'], 'Quote Backlinks': [true, 'Add quote backlinks.'],
@ -4731,7 +4731,7 @@
QR.cleanNotifications(); QR.cleanNotifications();
d.activeElement.blur(); d.activeElement.blur();
$.rmClass(QR.nodes.el, 'dump'); $.rmClass(QR.nodes.el, 'dump');
if (!Conf['Mistyped Captcha Errors']) { if (!Conf['Captcha Warning Notifications']) {
$.rmClass(QR.captcha.nodes.input, 'error'); $.rmClass(QR.captcha.nodes.input, 'error');
} }
if (Conf['QR Shortcut']) { if (Conf['QR Shortcut']) {
@ -4779,7 +4779,7 @@
} }
if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) {
QR.captcha.nodes.input.focus(); QR.captcha.nodes.input.focus();
if (Conf['Mistyped Captcha Errors']) { if (Conf['Captcha Warning Notifications']) {
QR.notifications.push(new Notification('warning', el)); QR.notifications.push(new Notification('warning', el));
} else { } else {
$.addClass(QR.captcha.nodes.input, 'error'); $.addClass(QR.captcha.nodes.input, 'error');

View File

@ -293,7 +293,7 @@ Config =
true true
'Show notifications on successful post creation or file uploading.' 'Show notifications on successful post creation or file uploading.'
] ]
'Mistyped Captcha Errors': [ 'Captcha Warning Notifications': [
true true
'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.' 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'
] ]

View File

@ -93,7 +93,7 @@ QR =
QR.cleanNotifications() QR.cleanNotifications()
d.activeElement.blur() d.activeElement.blur()
$.rmClass QR.nodes.el, 'dump' $.rmClass QR.nodes.el, 'dump'
unless Conf['Mistyped Captcha Errors'] unless Conf['Captcha Warning Notifications']
$.rmClass QR.captcha.nodes.input, 'error' $.rmClass QR.captcha.nodes.input, 'error'
if Conf['QR Shortcut'] if Conf['QR Shortcut']
$.toggleClass $('.qr-shortcut'), 'disabled' $.toggleClass $('.qr-shortcut'), 'disabled'
@ -128,7 +128,7 @@ QR =
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
# Focus the captcha input on captcha error. # Focus the captcha input on captcha error.
QR.captcha.nodes.input.focus() QR.captcha.nodes.input.focus()
if Conf['Mistyped Captcha Errors'] if Conf['Captcha Warning Notifications']
QR.notifications.push new Notification 'warning', el QR.notifications.push new Notification 'warning', el
else else
$.addClass QR.captcha.nodes.input, 'error' $.addClass QR.captcha.nodes.input, 'error'