Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement