A browser extension (Manifest V3) that migrates bookmarks, cookies (login state), pinned tabs, and browsing history between Chromium-based browsers. The extension uses Chrome APIs (chrome.bookmarks, chrome.cookies, chrome.tabs, chrome.history) to read/write data natively, bypassing DPAPI encryption issues entirely.
The complete extension source is bundled with this skill at: extension/
Key files:
manifest.json - Extension config (Manifest V3)core.js - SyncEngine object with all export/import logicpopup.html + popup.css + popup.js - UI layerbackground.js - Service worker (minimal)icons/ - Extension icons (16/48/128px)All Chromium-based: 360安全浏览器, 360极速浏览器, Chrome, Edge, 夸克, 豆包, Brave, Opera, Vivaldi, etc.
| Data Type | Chrome API | Notes |
|---|---|---|
| ----------- | ----------- | ------- |
| Bookmarks | chrome.bookmarks | Full tree with folders, merge or replace mode |
| Cookies (login state) | chrome.cookies | All cookies including auth tokens |
| Pinned tabs | chrome.tabs + chrome.windows | Restores as pinned tabs in target browser |
| Browsing history | chrome.history | Last 90 days, up to 50K entries |
Cannot migrate via extension: Saved passwords (security restriction — must be exported manually from browser settings), autofill data, extension data.
Guide the user through these steps:
extension/ directory from this skill's locationse://extensions/chrome://extensions/chrome://extensions/edge://extensions/://extensions/ URLextension/ folder.json fileThe export file format:
{
"_meta": {
"version": "1.0",
"source_browser": "360 浏览器",
"exported_at": "2026-06-10T...",
"data_types": ["bookmarks", "cookies", "tabs", "history"]
},
"bookmarks": [{ "title": "...", "type": "folder", "children": [...] }],
"cookies": [{ "url": "...", "name": "...", "value": "...", "domain": "..." }],
"tabs": { "pinned": [{ "url": "...", "title": "..." }], "regular": [...] },
"history": [{ "url": "...", "title": "...", "visitCount": 5 }]
}
.json migration fileWhen the user requests modifications, edit the files in the extension/ directory. Common customization scenarios:
SyncEngine in core.js:async exportNewType() {
// Use appropriate chrome.* API
return new Promise((resolve, reject) => { ... });
}
buildExportFile() with a new conditional blockpopup.html and handle in popup.jsmanifest.json if neededpopup.html - Structure and layoutpopup.css - Styling (gradient header, card-based design)popup.js - Interaction logic and view switchingexportHistory(90) parametermaxResults: 50000importCookies expiry checkexportCookies or importCookiesCurrently cookies are stored in plaintext in the JSON file. To encrypt:
crypto.subtle API in the service workerPasswords cannot be migrated via extension. Guide the user:
The extension UI includes a built-in help modal for this — direct users to click "查看操作方法" on the main screen.
| Issue | Cause | Fix |
|---|---|---|
| ------- | ------- | ----- |
| Extension won't load | Developer mode off | Enable developer mode toggle |
| "Permission denied" errors | Missing permissions | Check manifest.json permissions array |
| Cookies not restoring | Target browser blocks third-party cookies | Temporarily allow all cookies in browser settings |
| Bookmarks duplicated | Import mode set to merge with existing data | Use "替换" (replace) mode, or clear bookmarks first |
| Extension icon missing | Browser needs restart | Restart browser after installation |
| Export file empty | Browser APIs returned no data | Verify the browser actually has bookmarks/cookies/history data |
permission is needed for chrome.cookies API to access cookies from all domainschrome.cookies.set() API handles re-encryption automatically on the target browser共 1 个版本