aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2019-04-01 23:47:36 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-04-01 23:47:36 +0200
commitc2a339f2f8a5a9a44d5feaaa8a000f027873d7da (patch)
tree08f0e4ce576a6ba86925aed88a66d4eb4c4642db /p/scripts
parente5c8d52aa1ef5a624512b5faf64ea30697ef7e4c (diff)
[CI] Lint JS scripts with jshint (#2315)
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/install.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/p/scripts/install.js b/p/scripts/install.js
index b7975fd6e..967d27627 100644
--- a/p/scripts/install.js
+++ b/p/scripts/install.js
@@ -1,15 +1,15 @@
"use strict";
/* jshint globalstrict: true */
-function show_password() {
- var button = this;
+function show_password(ev) {
+ var button = ev.target;
var passwordField = document.getElementById(button.getAttribute('data-toggle'));
passwordField.setAttribute('type', 'text');
button.className += ' active';
return false;
}
-function hide_password() {
- var button = this;
+function hide_password(ev) {
+ var button = ev.target;
var passwordField = document.getElementById(button.getAttribute('data-toggle'));
passwordField.setAttribute('type', 'password');
button.className = button.className.replace(/(?:^|\s)active(?!\S)/g , '');
@@ -61,10 +61,10 @@ if (bd_type) {
bd_type.addEventListener('change', mySqlShowHide);
}
-function ask_confirmation(e) {
- var str_confirmation = this.getAttribute('data-str-confirm');
+function ask_confirmation(ev) {
+ var str_confirmation = ev.target.getAttribute('data-str-confirm');
if (!confirm(str_confirmation)) {
- e.preventDefault();
+ ev.preventDefault();
}
}
var confirms = document.getElementsByClassName('confirm');