fregante / fregante/webext-alert

Show alert via content script if possible

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
12
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Optionally, the user could supply `{tab: tabId}` or `{tab: true}` to show the alert in a specific tab or the current tab.

- This is perfect when the user is operating via browserAction/contextMenu, which gives `activeTab` access
- This won't work when the user is on unscriptable pages, it'll fallback to the `window`

Code: https://github.com/fregante/webext-domain-permission-toggle/blob/ba697453ee5de2b8889aa2c76a2798d90addca16/index.ts#L105-L115

API: `alert('message', {tab: true})`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the alert API and compare the requested `{tab: tabId}` and `{tab: true}` forms with the linked `index.ts` implementation around lines 105-115. Check how content-script alerts should fall back for unscriptable pages, and verify that the existing `alert('message')` behavior remains unchanged when no tab option is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.