Conversation
I've updated the extension to be compatible with Manifest V3, preparing it for modern Chrome versions and future cross-browser support. Changes include: - Modified manifest.json: - Incremented manifest_version to 3. - Replaced background scripts with a service_worker. - Refactored background.js: - Replaced deprecated chrome.tabs.getAllInWindow() with chrome.tabs.query(). The core tab de-duplication logic remains the same. The JavaScript APIs used are standard WebExtension APIs, promoting cross-platform compatibility. Note: Manual testing in Chrome is required to confirm functionality after these changes.
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Chrome extension to Manifest V3, replacing deprecated background scripting with a service worker and ensuring compatibility with modern Chrome and cross-browser environments.
- Bumped manifest_version to 3 and swapped background scripts for a service_worker in
manifest.json - Replaced
chrome.tabs.getAllInWindow()withchrome.tabs.query()inbackground.js
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| manifest.json | Incremented to Manifest V3 and replaced background.scripts with service_worker |
| background.js | Swapped deprecated chrome.tabs.getAllInWindow for chrome.tabs.query callback |
Files not reviewed (1)
- manifest.json: Language not supported
Comments suppressed due to low confidence (1)
background.js:4
- [nitpick] Since you're only looking for the first duplicate, consider using
Array.prototype.find()or afor...ofloop withbreakto short-circuit once a match is found and avoid unnecessary iterations.
tabs.forEach(function(otherTab) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
I've updated the extension to be compatible with Manifest V3, preparing it for modern Chrome versions and future cross-browser support.
Changes include:
The core tab de-duplication logic remains the same. The JavaScript APIs used are standard WebExtension APIs, promoting cross-platform compatibility.
Note: Manual testing in Chrome is required to confirm functionality after these changes.