Skip to content

Instantly share code, notes, and snippets.



Created Jan 20, 2011
What would you like to do?
Opera - gimme my slash back
* This is Opera user script, place me into ~/.opera/scripts
* You can read more about userjs here
* 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