Created
January 20, 2011 13:59
-
-
Save starenka/787909 to your computer and use it in GitHub Desktop.
Opera - gimme my slash back
This file contains 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
/* | |
* This is Opera user script, place me into ~/.opera/scripts | |
* You can read more about userjs here http://www.opera.com/docs/userjs/ | |
* | |
* This listener prevents events fired after keypress. | |
* Feel free to add more scancodes into the regexp. | |
* 47 - slash | |
* | |
* @author starenka | |
* @version 0.1 | |
* @since 20-01-2011 | |
*/ | |
window.opera.addEventListener('BeforeEventListener.keypress', function (ev){ | |
if(/^(47)$/.test("" + ev.event.keyCode)) ev.preventDefault(); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment