-// Migrate old localStorage to chrome.storage.local.
-if (localStorage.prefsMaxBackupItems !== undefined) {
- chrome.storage.local.set({
- prefs_max_backup_items: parseInt(localStorage.prefsMaxBackupItems),
- });
- localStorage.removeItem("prefsMaxBackupItems");
-}
-if (localStorage.prefsBackupTimer !== undefined) {
- chrome.storage.local.set({
- prefs_backup_timer: parseInt(localStorage.prefsBackupTimer),
- });
- localStorage.removeItem("prefsBackupTimer");
-}
-if (localStorage.prefsTheme !== undefined) {
- chrome.storage.local.set({
- prefs_theme: localStorage.prefsTheme,
- });
- localStorage.removeItem("prefsTheme");
-}
-localStorage.removeItem("lastBackupTime");
-
// Create a backup on first install (or if storage is wiped for some reason.
chrome.storage.local.get(function(items) {
// Setup defaults.
break;
}
- chrome.browserAction.setIcon({path: icon});
+ chrome.action.setIcon({path: icon});
}
function deleteBackup (backupName, callback) {
{
"name": "vapier tabs backup",
- "version": "0.3",
- "manifest_version": 2,
+ "version": "1.0",
+ "manifest_version": 3,
"description": "With 'Tabs Backup & Restore' you will never lose your work again! Backup an entire Chrome session (windows and tabs).",
"icons": { "16": "icon_16.png",
"48": "icon_48.png",
"128": "icon_128.png" },
"background": {
- "persistent": false,
- "scripts": ["background.js"]
+ "service_worker": "background.js",
+ "type": "module"
},
"options_ui": {
"page": "options.html",
- "chrome_style": true
+ "open_in_tab": false
},
- "browser_action": {
+ "action": {
"default_icon": "icon_48.png",
"default_popup": "popup.html"
},