Skip to content

Instantly share code, notes, and snippets.

@prasanthj
Created December 15, 2014 20:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prasanthj/a5b71c47ee0dec3bbb72 to your computer and use it in GitHub Desktop.
Save prasanthj/a5b71c47ee0dec3bbb72 to your computer and use it in GitHub Desktop.
Chrome extension get tab url
chrome.tabs.query({'active': true, 'lastFocusedWindow': true, 'currentWindow': true}, function (tabs) {
var url = tabs[0].url;
console.log(url);
});
@Akhil-TR
Copy link

Thank you for this query. I would like to know about that how can we access the url outside the block like another function called processUrl()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment