Created
February 23, 2022 03:47
-
-
Save caglarorhan/2b67fd008fc454c7e19af1ef0ac28391 to your computer and use it in GitHub Desktop.
Update a tab's URL from popup of chrome extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.tabs.query({active: true, currentWindow: true}, function (tabs) { | |
chrome.tabs.update(tabs[0].id, {url:event.target.dataset.link}, function (response) { | |
//what you want to do with response | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment