From 6bdd1a63c11043e2065d5ff020bc23f21c526bfd Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 14 Mar 2017 03:20:37 +0000 Subject: [PATCH] Stop copying newlines onto clipboard --- js/popup.js | 5 +---- manifest.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/js/popup.js b/js/popup.js index 8d7c5f2..a239649 100644 --- a/js/popup.js +++ b/js/popup.js @@ -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; } diff --git a/manifest.json b/manifest.json index 846ebae..9c462aa 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "__MSG_extName__", "short_name": "PWGen", "author": "Neale Pickett ", - "version": "1.1", + "version": "1.2", "default_locale": "en", "description": "__MSG_extDescription__",