title: Chrome Extension - Simple Content Script for running js on any page
body: <p>How can I write a simple Chrome Extension content script that will execute JavaScript (for example <code>alert("hello");</code>) on every page load?</p>
  
  <p>So when I navigate to a page or reload a page, the JavaScript should run.</p>
  
  <p>This is my <code>manifest.json</code> file so far:</p>
  
  <pre><code>{
      "name": "Highlight some phrases",
      "description": "Hightlight some pre defined text from websql database after page loads",
      "version": "0.1",
      "permissions": [
          "tabs","&lt;all_urls&gt;"
      ],
      "browser_action": {
          "default_icon": "icon.png",
          "default_popup": "popup.html"
      },
  
      "content_scripts": [
          {
          "matches": [
              "http://*/*",
              "https://*/*"
          ],
          "js": ["content.js"]
          }
      ],
  
      "background": {
          "page": "background.html" 
      },
  
      "manifest_version": 2
  }
  </code></pre>