-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·158 lines (137 loc) · 4.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<style type="text/css">
td {
padding-right: 10px;
}
.pwtext {
font-family: monospace;
}
body {
background-color: black;
color: limegreen;
}
/* unvisited link */
a:link {
color: yellow;
}
/* visited link */
a:visited {
color: gray;
}
/* mouse over link */
a:hover {
color: orange;
}
/* selected link */
a:active {
color: white;
}
/* Mobile layout */
@media only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
input {
float: left;
}
label {
float: left;
}
label + input {
clear: both;
}
/* Force table to not be like tables anymore */
table#pwtable, table#pwtable thead, table#pwtable tbody, table#pwtable th, table#pwtable td,
table#pwtable tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
table#pwtable thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
table#pwtable tr {
border: 1px solid #ccc;
}
table#pwtable td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 40%;
min-height: 2em;
}
table#pwtable td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
font-family: serif !important;
left: 6px;
padding-right: 2px;
white-space: nowrap;
}
/* Row labels */
table#pwtable td:nth-of-type(1):before {
content: "Password";
}
table#pwtable td:nth-of-type(2):before {
content: "Article";
}
table#pwtable td:nth-of-type(3):before {
content: "Link";
}
table#pwtable td:nth-of-type(4):before {
content: "zxcvbn-score";
}
}
</style>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script src="zxcvbn.js"></script>
<script src="xkcd-wiki-pwgen.js" charset="UTF-8"></script>
</head>
<body>
<script>window.jQuery || document.write('<script src="jquery-2.1.1.min.js"><\/script>')</script>
<h2>xkcd Wikipedia Password Generator:</h2>
<table>
<tr>
<td><label for="chars">Minimum length in characters:</label></td>
<td><input type="number" name="chars" id="chars" min=1 value=20></td>
</tr>
<tr>
<td><label for="sepachar">Separation character:</label></td>
<td><input type="text" maxlength="1" name="sepachar" id="sepachar" min=0 value="-" size="1"></td>
</tr>
<tr>
<td><label for="wiki">Wikipedia language:</label></td>
<td>
<fieldset id="wiki">
<input type="radio" id="de" name="wiki" value="de" checked="checked">
<label for="de">German</label>
<input type="radio" id="en" name="wiki" value="en">
<label for="en">English</label>
<input type="radio" id="es" name="wiki" value="es">
<label for="es">Spanish</label>
<input type="radio" id="fr" name="wiki" value="fr">
<label for="fr">French</label>
<input type="radio" id="it" name="wiki" value="it">
<label for="it">Italian</label>
<input type="radio" id="cs" name="wiki" value="cs">
<label for="cs">Czech</label>
<input type="radio" id="nl" name="wiki" value="nl">
<label for="nl">Dutch</label>
</fieldset>
</td>
</tr>
<tr>
<td><label for="times">Number of passwords to generate:</label></td>
<td><input type="number" name="times" id="times" min=1 max=20 value=3></td>
</tr>
</table>
<button onclick="generate()">Generate</button>
<br><br>
<div id="output"></div>
</body>
</html>