work on prompt() solution

This commit is contained in:
Kevin F 2021-10-12 07:34:19 +00:00
parent 9afe3ac2ab
commit b84a28f062
2 changed files with 15 additions and 1 deletions

View File

@ -19,6 +19,14 @@
const defaultHosts = "<all_urls>";
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()
}

View File

@ -9,6 +9,9 @@
<body>
<form>
<input type="checkbox" id="usePrompt">
<label for="usePrompt">Use prompt() dialogs on single-line inputs. This option will reveal typed passwords and may break some websites, but allows for faster typing and less CPU usage.</label>
<br>
<input type="checkbox" id="whitelistLAN">
<label for="whitelistLAN">Whitelist private IP + localhost range hostnames (e.g. routers)</label>
<h1>Trusted domains (comma delimited)</h1>