Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get current tab from chrome extension developer

chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
    let url = tabs[0].url;
    // use `url` here inside the callback because it's asynchronous!
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #current #tab #chrome #extension #developer
ADD COMMENT
Topic
Name
8+3 =