Here's what you would need :
One popup page which opens when you click on your extension icon on Chrome. This page should have a piece of javascript running that sends a message to the content script in the current selected tab and listens for the reply sent back by the content script. Something like :
$(function (){
chrome.tabs.query({active: true, currentWindow: true}, function (tabs){
chrome.tabs.sendMessage(tabs[0].id, {action: "getDetails"}, function(details){
//use details here
});
});
});
One content script which is injected directly into the main page (the page for which you need to extract the url in other information). This content script reads the information and passes it to the popup page via sendMessage api. Something like this :
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
//get details
sendResponse(details);
});
Here's an SO thread that mentions how you could talk to a popup page from content script : Chrome Extension how to send data from content script to popup.html
HTH!