Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
9cf67b5dec | |||
736367738f | |||
4dbd892d04 | |||
48f8b8d5bc | |||
2a0d1b0fe2 | |||
710fb753b7 |
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/.project
|
BIN
img/screenshot.png
Normal file
After Width: | Height: | Size: 11 KiB |
@@ -1,4 +0,0 @@
|
|||||||
body {
|
|
||||||
cursor: default;
|
|
||||||
font: caption;
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<link rel="stylesheet" href="pwgen.css"/>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<form>
|
|
||||||
<div>
|
|
||||||
<label for"length">length</label>
|
|
||||||
<input type="number" id="length" value="14" min="0" name="length">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for"special">include special chars</label>
|
|
||||||
<input type="checkbox" id="special" checked="checked" name="special">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for"pw">your password</label>
|
|
||||||
<input type="text" id="pw" name="pw">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button id="copy">copy to clipboard</button><button id="new">give me an other one</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for"directcopy">direct copy</label>
|
|
||||||
<input type="checkbox" id="directcopy" name="directcopy" title="next time when i click the button, copy the new password immediately to the clipboard">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<script src="pwgen.js"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Before Width: | Height: | Size: 473 B After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 647 B |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
@@ -2,7 +2,7 @@
|
|||||||
"description": "Just a toolbar button that generates a password and copies it to your clipboard.",
|
"description": "Just a toolbar button that generates a password and copies it to your clipboard.",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "pwgen reloaded",
|
"name": "pwgen reloaded",
|
||||||
"version": "1.1.2",
|
"version": "1.1.4",
|
||||||
"homepage_url": "https://github.com/S2-/pwgen",
|
"homepage_url": "https://github.com/S2-/pwgen",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "icons/lock-48.png"
|
"48": "icons/lock-48.png"
|
22
src/popup/pwgen.css
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
body {
|
||||||
|
margin: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="number"] {
|
||||||
|
-moz-appearance: none;
|
||||||
|
color: var(--in-content-text-color);
|
||||||
|
border: 1px solid var(--in-content-box-border-color);
|
||||||
|
-moz-border-top-colors: none !important;
|
||||||
|
-moz-border-right-colors: none !important;
|
||||||
|
-moz-border-bottom-colors: none !important;
|
||||||
|
-moz-border-left-colors: none !important;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: var(--in-content-box-background);
|
||||||
|
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
input[type="checkbox"] {
|
||||||
|
margin-bottom: -7px;
|
||||||
|
}
|
45
src/popup/pwgen.html
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="stylesheet" href="chrome://global/skin/global.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="chrome://mozapps/content/extensions/extensions.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="resource://gre-resources/forms.css" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="pwgen.css"/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for"length">length <input type="number" id="length" value="14" min="0" name="length"></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="special" checked="checked" name="special">
|
||||||
|
<label for"special">include special chars</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="pw">your password</label>
|
||||||
|
<input type="text" id="pw" name="pw">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<button id="copy" style="margin-left: 0;">copy to clipboard</button><button id="new">give me an other one</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="directcopy" name="directcopy" title="next time when i click the button, copy the new password immediately to the clipboard">
|
||||||
|
<label for="directcopy">direct copy</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<script src="pwgen.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@@ -1,7 +1,7 @@
|
|||||||
function randPassword(length, includeSpecial) {
|
function randPassword(length, includeSpecial) {
|
||||||
let pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
|
let pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
|
||||||
if (includeSpecial) {
|
if (includeSpecial) {
|
||||||
pwdChars += '°^!"§$%&\/()=?`´\\}][{²³€|<>-.,;:*+_';
|
pwdChars += '°^!"§$%&/()=?`´\\}][{²³€|<>-.,;:*+_µ@~';
|
||||||
}
|
}
|
||||||
let randPassword = Array(length).fill(pwdChars).map(function(x) {
|
let randPassword = Array(length).fill(pwdChars).map(function(x) {
|
||||||
return x[Math.floor(Math.random() * x.length)]
|
return x[Math.floor(Math.random() * x.length)]
|