0

So after it sets the data in the storage, I want it to refresh the page IF the current window's location is the same as the one in my matches in manifest.json

    chrome.storage.local.set({ "backgroundImage": file }, function() {
        alert("saved")
        alert(window.location.toString())

        if (window.location.toString().startsWith("https://animedao.to")) {
          chrome.tabs.reload()
        }
    })

But window.location.toString() returns my html file chrome-extension://extension id/Interface/interface.html

account 1
  • 11
  • 1
  • Does this answer your question? [window.location.href not working in chrome extension](https://stackoverflow.com/questions/12175124/window-location-href-not-working-in-chrome-extension) –  Dec 26 '21 at 09:34

0 Answers0