Issue
I'm trying to get the index of my active tab using Javascript for my Google Chrome extension. What should I do?
Solution
Does this help? It also depends on where it is executed from. This snippet is executed on a window event from popup.
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
chrome.tabs.executeScript(
tabs[0].id,
{ code: <your code> });
});
Answered By - Flat Screen Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.