Last active
July 3, 2024 01:46
-
-
Save rudiedirkx/579e55f30e0e2f89063bf792aba1c363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
document.addEventListener('mousedown', e => { | |
if (e.button == 2 && e.target.nodeName == 'SELECT') { | |
window.sst = setTimeout(function() { | |
var q = prompt('Search what?', ''); | |
if (q === '') { | |
[].forEach.call(e.target.options, o => o.style.display = ''); | |
} | |
else if (q != null) { | |
[].forEach.call(e.target.options, o => o.style.display = o.textContent.toLowerCase().indexOf(q) >= 0 ? '' : 'none'); | |
} | |
}, 300); | |
} | |
}); | |
document.addEventListener('mouseup', e => { | |
clearTimeout(window.sst); | |
}); | |
void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment