title: How to block inline javascript in chrome extension?
body: <p>The need is to replace a website syntax highlighter with another one. I've succeeded in block related JS and CSS file by add this in <code>manifest.json</code> file:</p>
  
  <pre><code>"background": {
     "scripts": ["background.js"]
  },
  "permissions": [   
      "webRequest",
      "webRequestBlocking",
      "http://*.oschina.net/", "https://*.oschina.net/"
  ],
  </code></pre>
  
  <p>and this in <code>background.js</code> file:</p>
  
  <pre><code>chrome.webRequest.onBeforeRequest.addListener(
  function(){ 
      return {cancel: true}; 
  },
  {
      urls: [
          "http://my.oschina.net/js/syntax-highlighter-2.1.382/scripts/brush.js",
          "http://my.oschina.net/js/syntax-highlighter-2.1.382/styles/shCore.css",
          "http://my.oschina.net/js/syntax-highlighter-2.1.382/styles/shThemeDefault.css"
      ],
      types: ["script","stylesheet"]
  },
  ["blocking"]
  </code></pre>
  
  <p>);</p>
  
  <p>so the js and css that former syntax highlighter need is blocked, but there is an initialize function called in inline html:</p>
  
  <pre><code>$(document).ready(function(){
      SyntaxHighlighter.config.clipboardSwf = '/js/syntax-highlighter-2.1.382/scripts/clipboard.swf';
      SyntaxHighlighter.all();
  });
  </code></pre>
  
  <p>So I got error message in console, how can I block it too in chrome extension scripts? </p>