Skip to content

Migrate from Manifest V2 to V3#161

Open
mnihalm wants to merge 2 commits intorohanb10:masterfrom
mnihalm:master
Open

Migrate from Manifest V2 to V3#161
mnihalm wants to merge 2 commits intorohanb10:masterfrom
mnihalm:master

Conversation

@mnihalm
Copy link
Copy Markdown

@mnihalm mnihalm commented Jan 29, 2026

Summary

  • Chrome deprecated Manifest V2 and no longer accepts MV2 extensions in the Web Store
  • This PR migrates the extension to Manifest V3

Changes

  • Converted background scripts to a service worker (scripts/service-worker.js)
  • Updated deprecated APIs:
    • chrome.browserActionchrome.action
    • chrome.extension.getURLchrome.runtime.getURL
  • Added guards for DOM-dependent code that doesn't work in service workers
  • Updated web_accessible_resources to MV3 format
  • Fixed dayjs to use globalThis instead of window for service worker compatibility

Testing

  • Tested snoozing tabs via popup, context menu, and keyboard shortcuts
  • Verified badge updates correctly
  • Confirmed notifications appear
  • Tested service worker restart behavior

🤖 Generated with Claude Code

mnihalm and others added 2 commits January 29, 2026 08:09
Chrome deprecated MV2 and no longer supports it in the Web Store.
This migration updates the extension to use MV3 service workers
instead of background scripts, replacing deprecated APIs and adding
guards for DOM-dependent code that doesn't work in service workers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add .gitignore for .claude/ directory
- Remove content_scripts for defunct snoozz.me website
- Remove uninstall and install page URLs (website gone)
- Update README to note this is a fork with MV3 updates
- Update settings.html and nap-room.html with working links
- Update docs/PRIVACY.md with permission explanations
- Remove unused snoozz.me.js content script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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