title: How to disable facebook hotkeys with Chrome extension?
body: <p>I have created a Chrome extension that uses the hotkeys [Alt]+[0...9] only to discover facebook uses the same hotkeys. Is there any way possible my extension could disable facebook's hotkeys so that mine fire alone? I'm fairly certain I have identified the code facebook uses to implement their [Alt]+[0...9] hotkeys:</p>
  
  <pre><code>document.documentElement.onkeydown=function(a){a=a||window.event;var b=a.target||a.srcElement;var c=a.keyCode==13&amp;&amp;!a.altKey&amp;&amp;!a.ctrlKey&amp;&amp;!a.metaKey&amp;&amp;!a.shiftKey&amp;&amp;CSS.hasClass...
  </code></pre>
  
  <p>This is in a script called from the head of the root document. I have tried the following to disable them:</p>
  
  <pre><code>//contents script:
  $().ready( function() {
    document.documentElement.onkeydown = '';
  });
  </code></pre>
  
  <p>and even</p>
  
  <pre><code>$().ready( function() {
    document.documentElement.onkeydown = function(e){};
  });
  </code></pre>
  
  <p>I am guessing further that the reason neither of these attempts work is because although Chrome extension content scripts share a DOM with any webpage on which they run, perhaps they do not share coding environments? Any insight would be appreciated!</p>