chrome extension get current tab url

JavaScript
chrome.tabs.query({currentWindow: true, active: true}, function(tabs){
    console.log(tabs[0].url);
});

Source

Also in JavaScript: