I think including some integration with the one sec app could be useful, too! This is something I have been working on with the app’s creator for the Fedigardens app, which calls a URL for specified actions (refresh, fetch more, etc.).
Addendum:
(I am updating this now that I'm at a keyboard)
The abstract I described above would be an app integration in Orion, not a web extension. I'll break down how the interventions work for Fedigardens (Mastodon client), which could be used as a template for Orion's implementation:
- A specific action calls the
onesec://reintervene?appId=fedigardens
app URL. Currently, this occurs whenever a user pulls down to refresh, or if the user presses the "Load More" button to load more posts.
- one sec will open, if installed, and show a breathing exercise.
- If the user confirms that they want to continue, one sec calls the caller's app URL (
gardens://
) and supplies information back about how long before the next intervention can be issued and other information.
- Fedigardens stores this data and listens for when a user performs an action that triggers a re-intervention. If it happens before the timeout, the action continues as normal, and if it fails, steps 1-3 are applied.
I also have the source code for this open at https://github.com/alicerunsonfedora/fedigardens/tree/devel/Packages/Interventions, for everyone's perusal.