title: chrome extension to get URL not working
body: <p>I tried making a chrome extension that could give URL string of current tab of current window.
  I had seen similar questions but, don't know why mine is not working.
  I had taken care of deprecated calls as well.
  <a href="https://www.dropbox.com/s/1i4hx35ztrp5de7/chrome_geturl.zip?dl=0" rel="nofollow">Here it is</a> </p>
  
  <p>I have even properly set the permissions in manifest.json file.
  But it's not working.
  Here are main js file code</p>
  
  <p>//background.js</p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(tab) {
        // Send a message to the active tab
        chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
          var activeTab = tabs[0];
          chrome.tabs.sendMessage(activeTab.id, {"message": "clicked_browser_action"});
        });
      });
  </code></pre>
  
  <p>//content.js</p>
  
  <pre><code>chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
      if( request.message === "clicked_browser_action" ) {
        var firstHref = $("a[href^='http']").eq(0).attr("href");
  
        //console.log(firstHref);
        alert(firstHref);
      }
    }
  );
  </code></pre>
  
  <p>Can someone help me? </p>