-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookmarklet.html
More file actions
24 lines (24 loc) · 1.25 KB
/
Copy pathbookmarklet.html
File metadata and controls
24 lines (24 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MasterKey Bookmarklet Generater</title>
<script type="text/javascript">
var go = function go() {
var masterkey = document.getElementById('masterkey').value;
var length = parseInt(document.getElementById('length').value) || 16;
var link = 'javascript:(function() {var script = document.createElement(\'script\');script.onload = function() {prompt(\'Password Generated for "\' + masterkey.parseHostName(location.hostname) + \'" :\', masterkey.makePassword2(location.hostname, \'' + masterkey + '\', ' + length + '))};script.src = "https://myfreeer.github.io/masterkey/src/masterkey_full.js";document.getElementsByTagName(\'head\')[0].appendChild(script);})();';
var a = document.createElement('a');
a.setAttribute('href', link);
a.innerHTML = 'Your MasterKey Password Generater';
document.body.appendChild(document.createElement("br"));
document.getElementsByTagName('body')[0].appendChild(a);
return link;
};
</script>
<body>
Enter Your MasterKey Here: <input type="text" id="masterkey"/>
<input type="button" id="button" value="GO" onclick="go()"/></br>
Length of Generated Password (Optional): <input type="number" id="length" value="16"/>
</body>
</html>