]> git.wh0rd.org Git - chrome-ext/tabs-backup.git/commitdiff
update to MV3
authorMike Frysinger <vapier@gentoo.org>
Fri, 7 Oct 2022 18:10:27 +0000 (23:55 +0545)
committerMike Frysinger <vapier@gentoo.org>
Fri, 7 Oct 2022 19:14:05 +0000 (00:59 +0545)
background.js
manifest.json

index 1bae0182fbe043a06d820f0dcbb1999a3b614ac1..4ba12fa3db836b144cc10e1203cd25ed2f5ef3a1 100644 (file)
@@ -1,24 +1,3 @@
-// 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.
@@ -304,7 +283,7 @@ function updateBrowserActionIcon (status) {
                        break;
        }
 
-       chrome.browserAction.setIcon({path: icon});
+       chrome.action.setIcon({path: icon});
 }
 
 function deleteBackup (backupName, callback) {
index 6efd31683dc506eb934ae960b1b40bb85b22037f..3441cd8618afd5427f75bc362382b449c8752b36 100644 (file)
@@ -1,20 +1,20 @@
 {
   "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"
   },