1
0
mirror of https://github.com/S2-/pwgen.git synced 2025-08-02 17:00:03 +02:00

8 Commits

Author SHA1 Message Date
s2
4dbd892d04 v1.1.3 2017-11-20 11:28:17 +01:00
s2
48f8b8d5bc add some more special chars 2017-11-20 11:27:36 +01:00
s2
2a0d1b0fe2 a screenshot 2017-11-16 09:42:57 +01:00
s2
710fb753b7 move everything to src 2017-11-16 09:24:32 +01:00
s2
c784e80ece 1.1.2 2017-11-16 09:17:11 +01:00
s2
8f7ec24032 change font 2017-11-16 09:17:03 +01:00
s2
9e6829e808 save settings immediately 2017-11-16 09:16:48 +01:00
s2
76362b8b6d escape \ so it can be used as special char 2017-11-16 08:41:33 +01:00
11 changed files with 13 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/.project

BIN
img/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1 +0,0 @@

View File

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 473 B

View File

Before

Width:  |  Height:  |  Size: 647 B

After

Width:  |  Height:  |  Size: 647 B

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -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
View File

@@ -0,0 +1,4 @@
body {
cursor: default;
font: caption;
}

View File

@@ -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) => {
saveOptions(getParams());
});
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;