I am making an chrome extension that shares url to one website. Now I need a code that can get current URL navigated in browser. When I click on icon I want to open new tab
You can use following function
chrome.tabs.getSelected(null,function(tab) { var taburl = tab.url; });