Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

chrome extension get current tab url

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

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!
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: npm react-device-detect 
Javascript :: npm koa 
Javascript :: string to uppercase 
Javascript :: remove whitespaces in javascript 
Javascript :: remove object property javascript es6 
Javascript :: boucle foreach js 
Javascript :: adding logo to vscode extension development 
Javascript :: dull a background image in react native 
Javascript :: javascript save data to local storage 
Javascript :: angular 12 tabs 
Javascript :: chrome.storage.local delete 
Javascript :: how to assign variables in javascript 
Javascript :: password reset passport-local mongoose 
Javascript :: material ui icons next js 
Javascript :: react render for loop 
Javascript :: if js 
Javascript :: angular scroll to element horizontally 
Javascript :: react-moralis 
Javascript :: Using json_encode() function to convert an Array to a string 
Javascript :: modulus js 
Javascript :: check if all values in array are zero javascript 
Javascript :: selected value 
Javascript :: JavaScript then() method 
Javascript :: chartjs templates 
Javascript :: Different between for of loop and for in loop in js 
Javascript :: math.round in javascript 
Javascript :: how to make an array of a value from 1 to the number 
Javascript :: javascript date array 
Javascript :: javascript get last word in string 
Javascript :: button disable in js 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =