0

I'm currently making a Chrome extension that contains two different scripts. For some reason when I navigate in and out of a website listed explicitly in the matches property, the script will not function unless I refresh the page. Is there a way to get the script to load each time without needing to refresh the page?

Here is my manifest.json:

 "content_scripts": [
        {
          "matches": ["<all_urls>"],
          "js": ["script.js"]
        },
        {
          "matches": ["https://www.somewebsite/*"],
          "js": ["script.js", "specificScript.js"]
        }
    ]
SamuelC00
  • 61
  • 6
  • This is a SPA site. Use MutationObserver or detect the URL change as [shown here](https://stackoverflow.com/a/39508954). – wOxxOm Sep 02 '22 at 18:14

0 Answers0