This is currently the code that I have, which injects my custom stylesheet into a specific website when the history state gets updated (in my background.js):