diff options
| author | 2019-04-01 23:47:36 +0200 | |
|---|---|---|
| committer | 2019-04-01 23:47:36 +0200 | |
| commit | c2a339f2f8a5a9a44d5feaaa8a000f027873d7da (patch) | |
| tree | 08f0e4ce576a6ba86925aed88a66d4eb4c4642db /p/scripts/install.js | |
| parent | e5c8d52aa1ef5a624512b5faf64ea30697ef7e4c (diff) | |
[CI] Lint JS scripts with jshint (#2315)
Diffstat (limited to 'p/scripts/install.js')
| -rw-r--r-- | p/scripts/install.js | 14 |
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'); |
