Add settings to continue/stop when page closes/URL changes

Repository details (talkie)
Project page
talkie
Project log category
(708 entries)
Repository
@joelpurra/talkie
Owner
@joelpurra
Contributors
Contributors on Github
Project status
⏲️ This project has had recent commits.
📂 This project is open.
🌠 This project is popular.
Repository activity period
🗓
Commits
751 commits
Stars
71 stars
Commit details (9f30d80c)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Add settings to continue/stop when page closes/URL changes

  • When selecting page text for speaking, using the Talkie browser button or corresponding keyboard shortcut, the "speaking tab" (id number) is stored.
    • Does not apply for text which does not have a tab context, such as (context menu-triggered) selected text or text from the clipboard.
  • Before this commit, Talkie always stopped reading (or attempted to) when the "speaking tab" (or window) was closed or the URL changed.
  • The behavior is inconsistent across websites and browsers.
    • Websites can script-trigger URL changes, with or without user interaction, stopping speech. This includes navigating menus or scrolling on infini-scroll pages.
    • Firefox does not trigger events (or include all event data) for (all) URL changes, meaning that speech does not stop. This is due to privacy concerns, even with the activeTab permission.
  • Introducing two settings, for both tab close and URL change events separately, to either continue or stop.
    • The default for all browsers is to stop on tab close.
    • The default for Firefox is to continue reading on URL change, consistent with current experienced behavior. All other browsers (Chromium-based) stop by default.

Fixes #45.

Raw text
Add settings to continue/stop when page closes/URL changes

- When selecting page text for speaking, using the Talkie browser button or corresponding keyboard shortcut, the "speaking tab" (id number) is stored.
  - Does not apply for text which does not have a tab context, such as (context menu-triggered) selected text or text from the clipboard.
- Before this commit, Talkie always stopped reading (or attempted to) when the "speaking tab" (or window) was closed or the URL changed.
- The behavior is inconsistent across websites and browsers.
  - Websites can script-trigger URL changes, with or without user interaction, stopping speech. This includes navigating menus or scrolling on infini-scroll pages.
  - Firefox does not trigger events (or include all event data) for (all) URL changes, meaning that speech does not stop. This is due to privacy concerns, even with the `activeTab` permission.
- Introducing two settings, for both tab close and URL change events separately, to either continue or stop.
  - The default for all browsers is to stop on tab close.
  - The default for Firefox is to continue reading on URL change, consistent with current experienced behavior. All other browsers (Chromium-based) stop by default.

Fixes #45.

Changed files (16)

Path Additions Deletions
code/packages/browser-background/src/background/create-talkie-services.mts +4 -0
code/packages/browser-background/src/background/get-dependencies.mts +1 -0
code/packages/browser-background/src/on-installed-manager.mts +15 -5
code/packages/browser-background/src/talkie-background.mts +40 -8
code/packages/options-application/src/app/sections/settings.tsx +42 -10
code/packages/options-application/src/app/sections/settings/continue-on-tab-removed.tsx +78 -0
code/packages/options-application/src/app/sections/settings/continue-on-tab-updated-url.tsx +104 -0
code/packages/options-application/src/app/sections/settings/continue-speech.tsx +59 -0
code/packages/options-application/src/containers/settings-container.tsx +21 -0
code/packages/options-application/src/slices/settings.mts +68 -0
code/packages/shared-application/src/settings-manager.mts +24 -0
code/packages/shared-application/src/storage-manager.mts +15 -2
code/packages/split-environment-interfaces/src/iapi.mts +10 -0
code/packages/split-environment-node/src/server-specific/api.mts +16 -0
code/packages/split-environment-webextension/src/browser-specific/api.mts +24 -0
code/packages/split-environment-webextension/src/browser-specific/italkie-services.mts +4 -0

Commit categories (3)