simple_form_password_with_hints 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 891b21002820e82ef116a1b150acfee6fc0134ee7330f710e3804a2ce0fdcd7a
|
4
|
+
data.tar.gz: 6cb703cc5b166a077d450af16a3f05fc4d004c440cb9980ca5f60dccf645b6f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58beba01eee82e29dd3497cf101b397de049465564865a2730b632b6d2f9b23d98cca51ab2c97b6bf2ffb03caf1edf50c56b6e512b7b20bcbfb5b4590087edd5
|
7
|
+
data.tar.gz: 22521ab12a5d39ec5c1b10066ab49f8640bb2a3d740f32ccccc472d0d15da5905f15b20e29475f2c3643642be59c61d2b7aedaf410a4fa0c79b4cc83e83b981e
|
data/Gemfile.lock
CHANGED
@@ -32,13 +32,21 @@ Element.prototype.parent = function (selector) {
|
|
32
32
|
|
33
33
|
(function () {
|
34
34
|
'use strict';
|
35
|
-
var
|
35
|
+
var initialized = false,
|
36
|
+
simpleFormPasswordWithHints;
|
37
|
+
|
38
|
+
simpleFormPasswordWithHints = {
|
36
39
|
init: function () {
|
37
40
|
var inputs = document.querySelectorAll('.js-sfpwh-hints-input'),
|
38
41
|
togglers = document.querySelectorAll('.js-sfpwh-password-toggle'),
|
39
42
|
syncInputs = document.querySelectorAll('.js-sfpwh-sync-input'),
|
40
43
|
i = 0;
|
41
44
|
|
45
|
+
if (initialized) {
|
46
|
+
return false;
|
47
|
+
}
|
48
|
+
initialized = true;
|
49
|
+
|
42
50
|
this.listen(inputs, 'input', this.onInput.bind(this));
|
43
51
|
this.listen(togglers, 'click', this.onClickToggler);
|
44
52
|
|
@@ -140,7 +148,12 @@ Element.prototype.parent = function (selector) {
|
|
140
148
|
return regex;
|
141
149
|
}
|
142
150
|
};
|
143
|
-
|
151
|
+
|
152
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
144
153
|
simpleFormPasswordWithHints.init();
|
145
|
-
}
|
154
|
+
} else {
|
155
|
+
window.addEventListener('DOMContentLoaded', () => {
|
156
|
+
simpleFormPasswordWithHints.init();
|
157
|
+
});
|
158
|
+
}
|
146
159
|
}());
|