feat: implement M3 multi-browser support (Firefox, Edge, Safari)
Add browser abstraction layer (compat.ts) that normalizes Chrome/Firefox/ Edge/Safari extension APIs behind a unified promise-based interface. Replace all direct chrome.* calls with compat layer across service worker, sync engine, badge, storage, popup, and options modules. - Browser-specific manifests in manifests/ (Firefox MV3 with gecko settings, Edge/Safari variants) - Multi-target build system: `npm run build` produces all four browser builds in build/<browser>/ - Per-browser build scripts: build:chrome, build:firefox, build:edge, build:safari - Auto-detects browser at runtime for platform-specific device registration - All 38 existing tests pass, typecheck clean Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
32
extension/manifests/chrome.json
Normal file
32
extension/manifests/chrome.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "CookieBridge",
|
||||
"version": "0.1.0",
|
||||
"description": "Cross-device cookie synchronization with end-to-end encryption",
|
||||
"permissions": [
|
||||
"cookies",
|
||||
"storage",
|
||||
"alarms",
|
||||
"tabs",
|
||||
"activeTab"
|
||||
],
|
||||
"host_permissions": ["<all_urls>"],
|
||||
"background": {
|
||||
"service_worker": "dist/background/service-worker.js",
|
||||
"type": "module"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "src/popup/popup.html",
|
||||
"default_icon": {
|
||||
"16": "src/icons/icon-gray-16.png",
|
||||
"48": "src/icons/icon-gray-48.png",
|
||||
"128": "src/icons/icon-gray-128.png"
|
||||
}
|
||||
},
|
||||
"options_page": "src/options/options.html",
|
||||
"icons": {
|
||||
"16": "src/icons/icon-blue-16.png",
|
||||
"48": "src/icons/icon-blue-48.png",
|
||||
"128": "src/icons/icon-blue-128.png"
|
||||
}
|
||||
}
|
||||
32
extension/manifests/edge.json
Normal file
32
extension/manifests/edge.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "CookieBridge",
|
||||
"version": "0.1.0",
|
||||
"description": "Cross-device cookie synchronization with end-to-end encryption",
|
||||
"permissions": [
|
||||
"cookies",
|
||||
"storage",
|
||||
"alarms",
|
||||
"tabs",
|
||||
"activeTab"
|
||||
],
|
||||
"host_permissions": ["<all_urls>"],
|
||||
"background": {
|
||||
"service_worker": "dist/background/service-worker.js",
|
||||
"type": "module"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "src/popup/popup.html",
|
||||
"default_icon": {
|
||||
"16": "src/icons/icon-gray-16.png",
|
||||
"48": "src/icons/icon-gray-48.png",
|
||||
"128": "src/icons/icon-gray-128.png"
|
||||
}
|
||||
},
|
||||
"options_page": "src/options/options.html",
|
||||
"icons": {
|
||||
"16": "src/icons/icon-blue-16.png",
|
||||
"48": "src/icons/icon-blue-48.png",
|
||||
"128": "src/icons/icon-blue-128.png"
|
||||
}
|
||||
}
|
||||
41
extension/manifests/firefox.json
Normal file
41
extension/manifests/firefox.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "CookieBridge",
|
||||
"version": "0.1.0",
|
||||
"description": "Cross-device cookie synchronization with end-to-end encryption",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "cookiebridge@rc707agency.com",
|
||||
"strict_min_version": "109.0"
|
||||
}
|
||||
},
|
||||
"permissions": [
|
||||
"cookies",
|
||||
"storage",
|
||||
"alarms",
|
||||
"tabs",
|
||||
"activeTab"
|
||||
],
|
||||
"host_permissions": ["<all_urls>"],
|
||||
"background": {
|
||||
"scripts": ["dist/background/service-worker.js"],
|
||||
"type": "module"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "src/popup/popup.html",
|
||||
"default_icon": {
|
||||
"16": "src/icons/icon-gray-16.png",
|
||||
"48": "src/icons/icon-gray-48.png",
|
||||
"128": "src/icons/icon-gray-128.png"
|
||||
}
|
||||
},
|
||||
"options_ui": {
|
||||
"page": "src/options/options.html",
|
||||
"open_in_tab": true
|
||||
},
|
||||
"icons": {
|
||||
"16": "src/icons/icon-blue-16.png",
|
||||
"48": "src/icons/icon-blue-48.png",
|
||||
"128": "src/icons/icon-blue-128.png"
|
||||
}
|
||||
}
|
||||
36
extension/manifests/safari.json
Normal file
36
extension/manifests/safari.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "CookieBridge",
|
||||
"version": "0.1.0",
|
||||
"description": "Cross-device cookie synchronization with end-to-end encryption",
|
||||
"permissions": [
|
||||
"cookies",
|
||||
"storage",
|
||||
"alarms",
|
||||
"tabs",
|
||||
"activeTab"
|
||||
],
|
||||
"host_permissions": ["<all_urls>"],
|
||||
"background": {
|
||||
"scripts": ["dist/background/service-worker.js"],
|
||||
"type": "module",
|
||||
"persistent": false
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "src/popup/popup.html",
|
||||
"default_icon": {
|
||||
"16": "src/icons/icon-gray-16.png",
|
||||
"48": "src/icons/icon-gray-48.png",
|
||||
"128": "src/icons/icon-gray-128.png"
|
||||
}
|
||||
},
|
||||
"options_ui": {
|
||||
"page": "src/options/options.html",
|
||||
"open_in_tab": true
|
||||
},
|
||||
"icons": {
|
||||
"16": "src/icons/icon-blue-16.png",
|
||||
"48": "src/icons/icon-blue-48.png",
|
||||
"128": "src/icons/icon-blue-128.png"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user