1
0
mirror of https://github.com/elisspace/AskAssist.git synced 2026-08-29 15:33:47 +00:00

minor tweaks to the rick

This commit is contained in:
Jeremy Dixon
2021-01-19 19:02:54 -06:00
parent 832237cf11
commit e93446b013
3 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ let options = {
"sound-select":"rick roll",
"watch-time": 4,
"possible-alerts": [
{name:"rick roll", file:'alert2'},
{name:"rick roll", file:'rick'},
{name:"soft beep", file:'alert1'}
]
};
@@ -79,10 +79,9 @@ function appendTool(html){
el.addEventListener("input", handleChange);
// prevent return and overspacing on contenteditable features
el.addEventListener("keypress", function(e){
if (e.target.innerHTML.length>2){
if (e.target.innerHTML.length>2 || isNaN(String.fromCharCode(e.which)) || e.which==13){
e.preventDefault();
};
if (isNaN(String.fromCharCode(e.which))) e.preventDefault();
});
});
});