Close #187
This commit is contained in:
parent
6d4da42eb2
commit
93589e80ef
@ -4924,7 +4924,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['Captcha Warning Notifications']) {
|
if (Conf['Captcha Warning Notifications'] && !d.hidden) {
|
||||||
QR.notify(el);
|
QR.notify(el);
|
||||||
} else {
|
} else {
|
||||||
$.addClass(QR.captcha.nodes.input, 'error');
|
$.addClass(QR.captcha.nodes.input, 'error');
|
||||||
@ -4942,10 +4942,9 @@
|
|||||||
notify: function(el) {
|
notify: function(el) {
|
||||||
var notice, notif;
|
var notice, notif;
|
||||||
notice = new Notice('warning', el);
|
notice = new Notice('warning', el);
|
||||||
QR.notifications.push(notice);
|
if (!(Header.areNotificationsEnabled && d.hidden)) {
|
||||||
if (!Header.areNotificationsEnabled) {
|
return QR.notifications.push(notice);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
notif = new Notification(el.textContent, {
|
notif = new Notification(el.textContent, {
|
||||||
body: el.textContent,
|
body: el.textContent,
|
||||||
icon: Favicon.logo
|
icon: Favicon.logo
|
||||||
@ -4953,6 +4952,7 @@
|
|||||||
return notif.onclick = function() {
|
return notif.onclick = function() {
|
||||||
return window.focus();
|
return window.focus();
|
||||||
};
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
notifications: [],
|
notifications: [],
|
||||||
cleanNotifications: function() {
|
cleanNotifications: function() {
|
||||||
|
|||||||
@ -4927,7 +4927,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['Captcha Warning Notifications']) {
|
if (Conf['Captcha Warning Notifications'] && !d.hidden) {
|
||||||
QR.notify(el);
|
QR.notify(el);
|
||||||
} else {
|
} else {
|
||||||
$.addClass(QR.captcha.nodes.input, 'error');
|
$.addClass(QR.captcha.nodes.input, 'error');
|
||||||
@ -4945,10 +4945,9 @@
|
|||||||
notify: function(el) {
|
notify: function(el) {
|
||||||
var notice, notif;
|
var notice, notif;
|
||||||
notice = new Notice('warning', el);
|
notice = new Notice('warning', el);
|
||||||
QR.notifications.push(notice);
|
if (!(Header.areNotificationsEnabled && d.hidden)) {
|
||||||
if (!Header.areNotificationsEnabled) {
|
return QR.notifications.push(notice);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
notif = new Notification(el.textContent, {
|
notif = new Notification(el.textContent, {
|
||||||
body: el.textContent,
|
body: el.textContent,
|
||||||
icon: Favicon.logo
|
icon: Favicon.logo
|
||||||
@ -4965,6 +4964,7 @@
|
|||||||
return notif.close();
|
return notif.close();
|
||||||
}, 7 * $.SECOND);
|
}, 7 * $.SECOND);
|
||||||
};
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
notifications: [],
|
notifications: [],
|
||||||
cleanNotifications: function() {
|
cleanNotifications: function() {
|
||||||
|
|||||||
@ -141,7 +141,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['Captcha Warning Notifications']
|
if Conf['Captcha Warning Notifications'] and !d.hidden
|
||||||
QR.notify el
|
QR.notify el
|
||||||
else
|
else
|
||||||
$.addClass QR.captcha.nodes.input, 'error'
|
$.addClass QR.captcha.nodes.input, 'error'
|
||||||
@ -153,8 +153,9 @@ QR =
|
|||||||
|
|
||||||
notify: (el) ->
|
notify: (el) ->
|
||||||
notice = new Notice 'warning', el
|
notice = new Notice 'warning', el
|
||||||
|
unless Header.areNotificationsEnabled and d.hidden
|
||||||
QR.notifications.push notice
|
QR.notifications.push notice
|
||||||
return unless Header.areNotificationsEnabled
|
else
|
||||||
notif = new Notification el.textContent,
|
notif = new Notification el.textContent,
|
||||||
body: el.textContent
|
body: el.textContent
|
||||||
icon: Favicon.logo
|
icon: Favicon.logo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user