'How to associate chrome extension with specific tab?

I am opening chrome extension in a tab instead of pop up with following code: chrome-extension://xxxxxxxxxxxxxxxxxx/popup.html

But when I do so the extension doesn't get associated with other tab I want to use this extension for. Is there a way I can explicitly tell extension which tab it needs listen to?



Solution 1:[1]

From what I researched it's not possible and it is depends on the extension source code. I was able to make adjustments into source code function to create a workaround. This is how extension selected tab:

chrome.tabs.query({
                active: true,
                currentWindow: true
            }, (tabs) => {
                var tab = tabs[0];

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eng80lvl