diff --git a/public/main.js b/public/main.js index 7e2fff2..5bd3734 100644 --- a/public/main.js +++ b/public/main.js @@ -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()