aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-18 14:57:34 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-18 15:09:31 +0200
commitc0d0279b03c4cd9f3b529da0b24db58cfb3520c1 (patch)
treed514906c39be9433117a1c6380ec6c1f7fa6fc28 /p/scripts
parentf727a1383639d5bdc762f73dfe93b9a5d577cb41 (diff)
Use openNotification instead of alert (main.js)
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 04151c30d..01bd0c734 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1012,7 +1012,7 @@ function init_crypto_form() {
async: false
}).done(function (data) {
if (data.salt1 == '' || data.nonce == '') {
- alert('Invalid user!');
+ openNotification('Invalid user!', 'bad');
} else {
try {
var strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function'),
@@ -1020,16 +1020,16 @@ function init_crypto_form() {
c = dcodeIO.bcrypt.hashSync(data.nonce + s, strong ? 4 : poormanSalt());
$('#challenge').val(c);
if (s == '' || c == '') {
- alert('Crypto error!');
+ openNotification('Crypto error!', 'bad');
} else {
success = true;
}
} catch (e) {
- alert('Crypto exception! ' + e);
+ openNotification('Crypto exception! ' + e, 'bad');
}
}
}).fail(function() {
- alert('Communication error!');
+ openNotification('Communication error!', 'bad');
});
$submit_button.removeAttr('disabled');