Stop copying newlines onto clipboard

This commit is contained in:
Neale Pickett 2017-03-14 03:20:37 +00:00
parent ba3374399f
commit 6bdd1a63c1
2 changed files with 2 additions and 5 deletions

View File

@ -45,11 +45,8 @@ function regen() {
password.value = chars.join("");
// Put it on the clipboard
let range = document.createRange();
range.selectNode(pw);
window.getSelection().addRange(range);
pw.select();
document.execCommand('copy');
window.getSelection().removeAllRanges();
document.getElementById('lentxt').textContent = len;
}

View File

@ -3,7 +3,7 @@
"name": "__MSG_extName__",
"short_name": "PWGen",
"author": "Neale Pickett <neale@woozle.org>",
"version": "1.1",
"version": "1.2",
"default_locale": "en",
"description": "__MSG_extDescription__",