mirror of https://github.com/nealey/chrome-pwgen
Stop copying newlines onto clipboard
This commit is contained in:
parent
ba3374399f
commit
6bdd1a63c1
|
@ -45,11 +45,8 @@ function regen() {
|
||||||
password.value = chars.join("");
|
password.value = chars.join("");
|
||||||
|
|
||||||
// Put it on the clipboard
|
// Put it on the clipboard
|
||||||
let range = document.createRange();
|
pw.select();
|
||||||
range.selectNode(pw);
|
|
||||||
window.getSelection().addRange(range);
|
|
||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
window.getSelection().removeAllRanges();
|
|
||||||
|
|
||||||
document.getElementById('lentxt').textContent = len;
|
document.getElementById('lentxt').textContent = len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "__MSG_extName__",
|
"name": "__MSG_extName__",
|
||||||
"short_name": "PWGen",
|
"short_name": "PWGen",
|
||||||
"author": "Neale Pickett <neale@woozle.org>",
|
"author": "Neale Pickett <neale@woozle.org>",
|
||||||
"version": "1.1",
|
"version": "1.2",
|
||||||
|
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_extDescription__",
|
"description": "__MSG_extDescription__",
|
||||||
|
|
Loading…
Reference in New Issue