Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
4dbd892d04 | |||
48f8b8d5bc | |||
2a0d1b0fe2 | |||
710fb753b7 | |||
c784e80ece | |||
8f7ec24032 | |||
9e6829e808 | |||
76362b8b6d |
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/.project
|
BIN
img/screenshot.png
Normal file
After Width: | Height: | Size: 11 KiB |
@@ -1 +0,0 @@
|
||||
|
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.",
|
||||
"manifest_version": 2,
|
||||
"name": "pwgen reloaded",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.3",
|
||||
"homepage_url": "https://github.com/S2-/pwgen",
|
||||
"icons": {
|
||||
"48": "icons/lock-48.png"
|
4
src/popup/pwgen.css
Normal file
@@ -0,0 +1,4 @@
|
||||
body {
|
||||
cursor: default;
|
||||
font: caption;
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
function randPassword(length, includeSpecial) {
|
||||
let pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
|
||||
if (includeSpecial) {
|
||||
pwdChars += '°^!"§$%&/()=?`´\}][{²³€|<>-.,;:*+_';
|
||||
pwdChars += '°^!"§$%&/()=?`´\\}][{²³€|<>-.,;:*+_µ@~';
|
||||
}
|
||||
let randPassword = Array(length).fill(pwdChars).map(function(x) {
|
||||
return x[Math.floor(Math.random() * x.length)]
|
||||
@@ -39,7 +39,6 @@ document.getElementById('new').addEventListener('click', (ev) => {
|
||||
ev.preventDefault();
|
||||
var params = getParams();
|
||||
document.getElementById('pw').value = randPassword(params.length, params.special);
|
||||
saveOptions(params);
|
||||
});
|
||||
|
||||
document.getElementById('copy').addEventListener('click', (ev) => {
|
||||
@@ -47,9 +46,12 @@ document.getElementById('copy').addEventListener('click', (ev) => {
|
||||
copypasstoclippboard();
|
||||
});
|
||||
|
||||
document.getElementById('directcopy').addEventListener('change', (ev) => {
|
||||
var list = document.getElementsByTagName('input');
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
list[i].addEventListener('change', (ev) => {
|
||||
saveOptions(getParams());
|
||||
});
|
||||
}
|
||||
|
||||
loadOptions().then((options) => {
|
||||
document.getElementById('length').value = options.length;
|