Skip to content

[Omni] Fix snap selection injection on web pages#83

Merged
olgahaha merged 3 commits into
mainfrom
omni/e42f8a19/proofsnap-extension
May 6, 2026
Merged

[Omni] Fix snap selection injection on web pages#83
olgahaha merged 3 commits into
mainfrom
omni/e42f8a19/proofsnap-extension

Conversation

@numbers-official
Copy link
Copy Markdown
Collaborator

@numbers-official numbers-official commented May 6, 2026

Summary

This fixes the "Failed to start selection mode" error when choosing a select area and clicking Snap Selection. The selection overlay is now injected from src/background/service-worker.ts on demand for valid web pages, avoiding broad http://*/* and https://*/* host permissions that could complicate Chrome Web Store review. The unused src/content/selection-overlay.ts content script has been removed.

Changes

  • Move snap selection overlay setup into src/background/service-worker.ts using runtime script injection.
  • Restrict extension host permissions to the required Numbers API domain instead of all HTTP/HTTPS pages.
  • Remove the obsolete src/content/selection-overlay.ts content script.
  • Update vite.config.ts so the removed content script is no longer built.

4 files changed, +233 additions, -229 deletions

File changes
.omni/e42f8a19-untitled/memory.md |  23 ++++
 src/background/service-worker.ts  | 212 +++++++++++++++++++++++++++++++++++-
 src/content/selection-overlay.ts  | 224 --------------------------------------
 vite.config.ts                    |   3 +-

Generated by Olga Shen with Omni

@numbers-official numbers-official changed the title [Omni] Allow snap selection on valid web pages [Omni] Fix snap selection script injection May 6, 2026
@numbers-official numbers-official changed the title [Omni] Fix snap selection script injection [Omni] Fix snap selection injection on web pages May 6, 2026
@olgahaha olgahaha merged commit 2b29c24 into main May 6, 2026
1 check passed
@olgahaha olgahaha deleted the omni/e42f8a19/proofsnap-extension branch May 6, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants