This commit is contained in:
parent
957c721476
commit
b8f927be2b
@ -2,7 +2,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
loading()
|
||||
var hold, external, timeout, ac, last, darklight = document.getElementById('darkcss').getAttribute('href')
|
||||
document.getElementById('instance').addEventListener('keydown', function (event) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey && !event.shiftKey) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey) {
|
||||
if ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== '')) {
|
||||
last = event.target.value
|
||||
} else {
|
||||
@ -15,9 +15,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
})
|
||||
document.getElementById('instance').addEventListener('keyup', function (event) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey && !event.shiftKey) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey) {
|
||||
if ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== '')) {
|
||||
keypress(event.target.value)
|
||||
} else if (event.target.value === '' && document.getElementById('instancelist').firstChild?.innerText !== 'Top 100') {
|
||||
ranking()
|
||||
} else {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
Loading…
Reference in New Issue
Block a user