For WebExtensions, there are several methods to check a page's URL:
window.location.href
in a content script,- the
webRequest
API, and tabs.onUpdated
.
Which one to use when you just need to check the URL, and maybe redirect based on it? Which is easiest to code? Are there reasons for using the others?