mirror of
https://github.com/S2-/pwgen.git
synced 2025-08-03 09:10:04 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
0d6278cd82 | |||
fee9b6b20a |
@@ -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.9",
|
"version": "1.1.10",
|
||||||
"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"
|
||||||
|
@@ -42,10 +42,12 @@ function copypasstoclippboard(cb) {
|
|||||||
if (typeof(cb) === 'function') {
|
if (typeof(cb) === 'function') {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
fade(document.getElementById('copied'));
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fade(element) {
|
function fade(element) {
|
||||||
|
element.style.display = 'block';
|
||||||
var op = 1; // initial opacity
|
var op = 1; // initial opacity
|
||||||
var timer = setInterval(function () {
|
var timer = setInterval(function () {
|
||||||
if (op <= 0.1) {
|
if (op <= 0.1) {
|
||||||
@@ -84,11 +86,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
document.getElementById('pw').value = randPassword(getParams().length, getParams().special);
|
document.getElementById('pw').value = randPassword(getParams().length, getParams().special);
|
||||||
|
|
||||||
if (options.directcopy) {
|
if (options.directcopy) {
|
||||||
copypasstoclippboard(() => {
|
copypasstoclippboard();
|
||||||
let copied = document.getElementById('copied');
|
|
||||||
copied.style.display = 'block';
|
|
||||||
fade(copied)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user