mirror of
https://github.com/S2-/pwgen.git
synced 2025-08-02 17:00:03 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a53d60474d | |||
4d7fefccfc |
@@ -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.10",
|
||||
"version": "1.1.11",
|
||||
"homepage_url": "https://github.com/S2-/pwgen",
|
||||
"icons": {
|
||||
"48": "icons/lock-48.png"
|
||||
|
@@ -26,7 +26,7 @@ input[type="checkbox"] {
|
||||
margin-bottom: -7px;
|
||||
}
|
||||
|
||||
#copied {
|
||||
.copied {
|
||||
/*height: 100%;*/
|
||||
width: 100%;
|
||||
background-color: #FFF8DC;
|
||||
@@ -36,3 +36,15 @@ input[type="checkbox"] {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fadein {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition: opacity 1s linear;
|
||||
}
|
||||
|
||||
.fadeout {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="copied" style="display: none;">password copied to clipboard</div>
|
||||
<div class="copied" style="display: none;">password copied to clipboard</div>
|
||||
|
||||
<form>
|
||||
|
||||
|
@@ -42,21 +42,22 @@ function copypasstoclippboard(cb) {
|
||||
if (typeof(cb) === 'function') {
|
||||
cb();
|
||||
}
|
||||
fade(document.getElementById('copied'));
|
||||
fade(document.getElementsByClassName('copied')[0]);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
function fade(element) {
|
||||
element.style.display = 'block';
|
||||
var op = 1; // initial opacity
|
||||
var timer = setInterval(function () {
|
||||
if (op <= 0.1) {
|
||||
clearInterval(timer);
|
||||
element.style.display = 'none';
|
||||
}
|
||||
element.style.opacity = op;
|
||||
op -= op * 0.1;
|
||||
}, 50);
|
||||
var clone = element.cloneNode(true);
|
||||
clone.style.display = 'block';
|
||||
element.parentNode.insertBefore(clone, element.nextSibling);
|
||||
|
||||
setTimeout(() => {
|
||||
clone.className += ' fadeout';
|
||||
}, 500);
|
||||
|
||||
setTimeout(() => {
|
||||
clone.remove();
|
||||
}, 1100);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
Reference in New Issue
Block a user