title: Content script into Whatsapp web
body: <p>I am trying to create a small extension for chrome. I want to use a content script in <a href="http://web.whatsapp.com" rel="nofollow">web.whatsapp.com.</a><br>
  My manifest:</p>
  
  <pre><code>{
    "manifest_version": 2,
  
    "name": "Hello world",
    "description": "Hello world",
    "version": "1.0",
  
    "browser_action": {
      "default_icon": "icon.png",
      "default_popup": "popup.html"
    },
    "content_scripts": [
      {
        "matches": ["*://web.whatsapp.com*"],
        "js": ["content_script.js"]
      }
    ],
    "permissions": [
      "activeTab",
        ]
  }
  </code></pre>
  
  <p>My content_script:</p>
  
  <pre><code>chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
       if (request.greeting == "hello")
              sendResponse({message: "hi"});
    });
  </code></pre>
  
  <p>I use these codes in my popup.js to test if the content-script is injected:</p>
  
  <pre><code>chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
      chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) {
          if (response) {
              console.log("Already there");
          }
          else {
              console.log("Not there, inject contentscript");
          }
      });
  });
  </code></pre>
  
  <p>And apparently it always prints <code>"Not there, inject contentscript"</code>. I also checked the <code>content script</code> in <code>developer tools</code> in <code>sources</code> tab, and could not find my script there.
  What did I do wrong?
  <br></p>