Go to Twitter\'s login page and type the following in the console:
window.addEventListener(\'keypress\', function(e){console.log(\'hello\')}, true)
Because those sites have specifically set (for webkit apparently):
console.log = function(){};
However, in Chrome you can restore the original log()
functionality by issuing this command in console:
console.log = console.__proto__.log
Then you can do this:
window.addEventListener('keypress', function(e){console.log('hello')}, true)
And it should work as expected.