You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Built-in support for Content Scripts running in SPAs #1029
As the docs state, manually listening to URL changes works. But managing ctx correctly is annoying, and not shown in the docs. This would also create ctx for each URL path, so the script can shut down properly when the path changes.
I've implemented this in my own extension. There's a few TODOs, but it seems to be working well. It needs to be adapted into the form mentioned above, and we should mark it as experimental.
Activity
aklinker1 commentedon Oct 3, 2024
This won't be an easy first-contribution, but it should be relatively easy to implement:
spatype for content script definitionspa: truespa: true, somehow passing the real match pattern into the util[-]Built-in support for Content Scripts running on SPAs[/-][+]Built-in support for Content Scripts running in SPAs[/+]aklinker1 commentedon May 26, 2026
I've implemented this in my own extension. There's a few TODOs, but it seems to be working well. It needs to be adapted into the form mentioned above, and we should mark it as experimental.
https://github.com/anime-skip/player/blob/d62a241f92ee7c453d0d33e31939a5b741d0af5b/apps/extension/src/utils/define-spa-content-script.ts