diff options
author | 2014-09-13 19:16:07 -0400 | |
---|---|---|
committer | 2014-09-13 19:16:07 -0400 | |
commit | a7bfe57a2a355c5362d33e993394aa0bac300360 (patch) | |
tree | 1f81b256828f90ff34656d7d8fe703ce13d22e48 /lib/js/urweb.js | |
parent | 6b6635f390cc072971dcc7b37af00bca21c48364 (diff) | |
parent | 5d2d4930568267b0e205ece3d4908cdc7ff715a1 (diff) |
Merge.
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r-- | lib/js/urweb.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index c3cab50a..5cc49fec 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -1050,6 +1050,18 @@ function inp(s, name) { return x; } +function password(s, name) { + if (suspendScripts) + return; + + var x = input(document.createElement("input"), s, + function(x) { return function(v) { if (x.value != v) x.value = v; }; }, "password", name); + x.value = s.data; + x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) }; + + return x; +} + function selectValue(x) { if (x.options.length == 0) return ""; @@ -1212,6 +1224,13 @@ function sidx(s, ch) { else return r; } +function ssidx(h, n) { + var r = h.indexOf(n); + if (r == -1) + return null; + else + return r; +} function sspn(s, chs) { for (var i = 0; i < s.length; ++i) if (chs.indexOf(s.charAt(i)) != -1) |