Skip to content

Fix MV3 bugs, add preferences page, shortcuts, and duplicate-tab closing#18

Open
mos3abof wants to merge 1 commit into
masterfrom
jellycat/yswqsnstszxz
Open

Fix MV3 bugs, add preferences page, shortcuts, and duplicate-tab closing#18
mos3abof wants to merge 1 commit into
masterfrom
jellycat/yswqsnstszxz

Conversation

@mos3abof
Copy link
Copy Markdown
Member

@mos3abof mos3abof commented May 6, 2026

Summary

  • Split manifest.json into manifest.firefox.json and manifest.chrome.json; Chrome now correctly uses service_worker and action (MV3); Firefox gains a gecko ID for AMO publishing
  • Fixed contextMenus.onclick (broken in MV3) → onClicked listener registered in onInstalled, as required by Chrome service workers
  • Guarded against undefined tab URLs (new tab pages, internal browser pages)
  • Replaced deprecated event.keyCode with event.key in popup
  • Batch-remove tabs with a single chrome.tabs.remove([...ids]) call instead of one per tab
  • Context menu now surfaces on image, link, and frame contexts, not just page
  • New "Close duplicate tabs" context menu item
  • New options page: exclude current tab, exclude pinned tabs, exclude extension pages, case-sensitive matching (all backed by storage.sync)
  • Keyboard shortcut Ctrl+Shift+X / ⌘+Shift+X to open the popup without clicking the toolbar icon
  • Esc now closes the popup as the footer text has always promised
  • Updated stale homepage_url and in-popup website link to the new GitHub location
  • Makefile: separate build-firefox / build-chrome targets, versioned zip filenames (power-close-1.1.0-*.zip), and lint / run targets via web-ext
  • Bumped version to 1.1.0 across both manifests

Test Plan

  • make build produces dist/power-close-1.1.0-firefox.zip and dist/power-close-1.1.0-chrome.zip
  • Load Firefox build via about:debugging and verify keyword/domain closing works
  • Load Chrome build via chrome://extensions and verify keyword/domain closing works
  • Ctrl+Shift+X opens the popup; Esc closes it
  • Right-clicking an image or link shows both context menu items
  • "Close duplicate tabs" leaves one copy of each URL open
  • Options page persists settings across browser restarts
  • Pinned tabs survive when "Don't close pinned tabs" is enabled
  • Current tab survives when "Don't close the current tab" is enabled
  • make lint passes web-ext lint without errors

## Summary

- Split `manifest.json` into `manifest.firefox.json` and
  `manifest.chrome.json`; Chrome now correctly uses `service_worker` and
  `action` (MV3); Firefox gains a gecko ID for AMO publishing
- Fixed `contextMenus.onclick` (broken in MV3) → `onClicked` listener
  registered in `onInstalled`, as required by Chrome service workers
- Guarded against `undefined` tab URLs (new tab pages, internal browser
  pages)
- Replaced deprecated `event.keyCode` with `event.key` in popup
- Batch-remove tabs with a single `chrome.tabs.remove([...ids])` call
  instead of one per tab
- Context menu now surfaces on `image`, `link`, and `frame` contexts,
  not just `page`
- New "Close duplicate tabs" context menu item
- New options page: exclude current tab, exclude pinned tabs, exclude
  extension pages, case-sensitive matching (all backed by
  `storage.sync`)
- Keyboard shortcut `Ctrl+Shift+X` / `⌘+Shift+X` to open the popup
  without clicking the toolbar icon
- `Esc` now closes the popup as the footer text has always promised
- Updated stale `homepage_url` and in-popup website link to the new
  GitHub location
- Makefile: separate `build-firefox` / `build-chrome` targets, versioned
  zip filenames (`power-close-1.1.0-*.zip`), and `lint` / `run` targets
  via `web-ext`
- Bumped version to `1.1.0` across both manifests

## Test Plan

- [ ] `make build` produces `dist/power-close-1.1.0-firefox.zip` and
  `dist/power-close-1.1.0-chrome.zip`
- [ ] Load Firefox build via `about:debugging` and verify keyword/domain
  closing works
- [ ] Load Chrome build via `chrome://extensions` and verify
  keyword/domain closing works
- [ ] `Ctrl+Shift+X` opens the popup; `Esc` closes it
- [ ] Right-clicking an image or link shows both context menu items
- [ ] "Close duplicate tabs" leaves one copy of each URL open
- [ ] Options page persists settings across browser restarts
- [ ] Pinned tabs survive when "Don't close pinned tabs" is enabled
- [ ] Current tab survives when "Don't close the current tab" is enabled
- [ ] `make lint` passes `web-ext lint` without errors
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.

1 participant