Answer the question
In order to leave comments, you need to log in
Optimal solution to restart content script after changing url?
There is dynamic content in one tab, the google chrome extension does what it needs on the first run, when I go to another tab and return, the added elements disappear, which is obvious.
The content script fires when I reload the page, F5 .
I read that you can track URL changes in background.js
. when i switch tabs it changes tab=0, tab=1, tab=2 in url etc. The page itself does not reload when switching tabs.
So here's how to restart contentScript.js when you return to the tab.
I dug up a cloud of solutions, a lot of errors. It is not possible to debug the extension, the site is not mine.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question