0

My manifest looks like this:

 {
      "js": ["JS/jquery.min.js","checkUser.js"],
      "matches": ["https://www.instagram.com/*/"],
      "run_at": "document_start"
  }

However, checkUser.js is always running when I'm on any sub page. I want to it to be running when it is having only one placeholder between the two slashes, such as "https://www.instagram.com/user1/", "https://www.instagram.com/user2/" and so on. Is there an efficient way to do this?

Max
  • 153
  • 11
  • 1
    Instagram is a SPA so the page is initialized just once, subsequent navigation is faked via pushState. It means that content scripts can run only once. You need to observe changes of the URL, [example](https://stackoverflow.com/a/39508954). – wOxxOm May 08 '21 at 11:13

1 Answers1

0

I managed to make it work by using exclude_globs by reading this site.

Max
  • 153
  • 11