-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
60 lines (60 loc) · 2.59 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
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="author" content="doggy" >
<title>Simple online password generator</title>
<meta content="password generator" name="keywords">
<meta content="simple password-generator" name="description">
<link rel="stylesheet" href="dragdealer.css" type="text/css" media="screen">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<script type="text/javascript" src="dragdealer.js"></script>
<script type="text/javascript" src="script.js"></script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" class="h100">
<table cellpadding=0 cellspacing=0 border=0 align=center class="h100">
<tr>
<td valign="middle" align="center" heihgt="100%">
<div class=main align=center>
<input type=text id=pw class=input1>
<div id="my-slider" class="dragdealer" title="Password length">
<div class="red-bar handle" id="drag-helper">drag me</div>
</div>
<div id="boxes">
<label id="l1" title="Use small letters"><input onChange="refreshpw();" type="checkbox" id=arg1 name=arg1 checked>small letters</label>
<label id="l2" title="Use big letters"><input onChange="refreshpw();" type="checkbox" id=arg2 name=arg2>big letters</label>
<label id="l3" title="Use numbers"><input onChange="refreshpw();" type="checkbox" id=arg3 name=arg3 checked>numbers</label>
<label id="l4" title="Use punctuation"><input onChange="refreshpw();" type="checkbox" id=arg4 name=arg4>punctuation</label>
</div>
<button id=re class="input2" onClick="refreshpw();return false;" title="Generate!">Generate password</button>
<div id="footer">
<small>Source: <a href='https://github.com/aleksandr-rakov/password-generator'>https://github.com/aleksandr-rakov/password-generator</a></small>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
var pw_len;
function refreshpw(){
genpw('pw',pw_len,'arg1','arg2','arg3','arg4');
}
new Dragdealer('my-slider',
{
x : 0.09,
steps: 57,
snap : true,
animationCallback: function(x, y){
pw_len=parseInt(3 + x * 57);
document.getElementById('drag-helper').innerHTML=pw_len + ' signs';
refreshpw('pw');
}
});
labels=['l1','l2','l3','l4'];
labels.forEach(function (el_id){
el=document.getElementById(el_id);
el.onselectstart = function () { return false; } // ie
el.onmousedown = function () { return false; } // mozilla
});
</script>
</div>
</body>
</html>