diff --git a/background.js b/background.js index eee9895..b737499 100644 --- a/background.js +++ b/background.js @@ -19,6 +19,14 @@ const defaultHosts = ""; let appCode = function (){ + let clearSelect = function() + { + if (window.getSelection) {window.getSelection().removeAllRanges()} + else if + (document.selection) { + document.selection.empty() + } + } let minValue = 75 let maxValue = 150 let time = 0 @@ -46,8 +54,11 @@ let appCode = function (){ } text = prompt("[PrivateKeyboard]\n\nEnter text for the " + inputType + " field:", e.target.value) } - e.target.value = text + if (text !== null) { + e.target.value = text + } last = e.target + clearSelect() time = Date.now() } diff --git a/settings/options.html b/settings/options.html index 41d76a1..b5efcbe 100644 --- a/settings/options.html +++ b/settings/options.html @@ -9,6 +9,9 @@
+ + +

Trusted domains (comma delimited)