Fix MV3 bugs, add preferences page, shortcuts, and duplicate-tab closing#18
Open
mos3abof wants to merge 1 commit into
Open
Fix MV3 bugs, add preferences page, shortcuts, and duplicate-tab closing#18mos3abof wants to merge 1 commit into
mos3abof wants to merge 1 commit into
Conversation
## 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
manifest.jsonintomanifest.firefox.jsonandmanifest.chrome.json; Chrome now correctly usesservice_workerandaction(MV3); Firefox gains a gecko ID for AMO publishingcontextMenus.onclick(broken in MV3) →onClickedlistener registered inonInstalled, as required by Chrome service workersundefinedtab URLs (new tab pages, internal browser pages)event.keyCodewithevent.keyin popupchrome.tabs.remove([...ids])call instead of one per tabimage,link, andframecontexts, not justpagestorage.sync)Ctrl+Shift+X/⌘+Shift+Xto open the popup without clicking the toolbar iconEscnow closes the popup as the footer text has always promisedhomepage_urland in-popup website link to the new GitHub locationbuild-firefox/build-chrometargets, versioned zip filenames (power-close-1.1.0-*.zip), andlint/runtargets viaweb-ext1.1.0across both manifestsTest Plan
make buildproducesdist/power-close-1.1.0-firefox.zipanddist/power-close-1.1.0-chrome.zipabout:debuggingand verify keyword/domain closing workschrome://extensionsand verify keyword/domain closing worksCtrl+Shift+Xopens the popup;Esccloses itmake lintpassesweb-ext lintwithout errors