I visit a website with javascript file in HTML header
<script language="javascript" src="javscript.js"></script>
Code inside this file:
if (document.layers) document.captureEvents(Event.KEYPRESS)
function update(e) {
if (document.all) {
if (event.keyCode==13) document.forms[0].submit();
else if (event.keyCode==26) runHelp(hplk);
return;
} else {
if (e.which==13) document.forms[0].submit();
else if (e.which==26) runHelp(hplk);
return;
}
}
document.onkeypress=update;
I want to disable / remove / replace this function with Greasemonkey.
I tried it with
unsafeWindow.update = function(){}
no result! (there were no errors in the console)
Is there any way to kill this feature?
source
share