File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 36
36
< span class ="os lin mac ">
37
37
{% if accs %}< code > < b id ="pw0 "> {{ pw }}</ b > </ code > =password, {% endif %}< code > < b > mp</ b > </ code > =mountpoint
38
38
</ span >
39
- < a href ="# " id ="setpw "> use real password</ a >
39
+ {% if accs %} < a href ="# " id ="setpw "> use real password</ a > {% endif %}
40
40
</ p >
41
41
42
42
Original file line number Diff line number Diff line change @@ -49,19 +49,21 @@ function setos(os) {
49
49
setos ( WINDOWS ? 'win' : LINUX ? 'lin' : MACOS ? 'mac' : 'idk' ) ;
50
50
51
51
52
- ebi ( 'setpw' ) . onclick = function ( e ) {
52
+ function setpw ( ) {
53
53
ev ( e ) ;
54
54
modal . prompt ( 'password:' , '' , function ( v ) {
55
55
if ( ! v )
56
56
return ;
57
57
58
58
var pw0 = ebi ( 'pw0' ) . innerHTML ,
59
59
oa = QSA ( 'b' ) ;
60
-
60
+
61
61
for ( var a = 0 ; a < oa . length ; a ++ )
62
62
if ( oa [ a ] . innerHTML == pw0 )
63
63
oa [ a ] . textContent = v ;
64
64
65
65
add_dls ( ) ;
66
66
} ) ;
67
67
}
68
+ if ( ebi ( 'setpw' ) )
69
+ ebi ( 'setpw' ) . onclick = setpw ;
You can’t perform that action at this time.
0 commit comments