single quotes

This commit is contained in:
meow 2022-04-20 12:49:05 +03:00
parent 577a2356a0
commit 7940e91cbe
3 changed files with 40 additions and 40 deletions

View file

@ -152,14 +152,14 @@
let focused_tag = document.activeElement.tagName.toLowerCase();
const allowed = /^(button|checkbox|file|radio|submit)$/;
if (focused_tag === "textarea") return;
if (focused_tag === "input") {
if (focused_tag === 'textarea') return;
if (focused_tag === 'input') {
let focused_type = document.activeElement.type.toLowerCase();
if (!focused_type.match(allowed)) return;
}
// Focus search bar on '/'
if (event.key === "/") {
if (event.key === '/') {
document.getElementById('searchbox').focus();
event.preventDefault();
}