]> git.wh0rd.org Git - chrome-ext/tabs-backup.git/commitdiff
options: switch to integrated Chrome
authorMike Frysinger <vapier@gentoo.org>
Fri, 7 Oct 2022 17:19:55 +0000 (23:04 +0545)
committerMike Frysinger <vapier@gentoo.org>
Fri, 7 Oct 2022 17:28:07 +0000 (23:13 +0545)
This has better UI than opening a dedicated tab.

advanced.js
manifest.json
options.html
popup.js

index 63109b6dd60ca46d4d75b09edfd0e9e615cf6d95..5916ed2533cb0956426eb8035a7f88da9cfed05c 100644 (file)
@@ -43,7 +43,7 @@ document.addEventListener('DOMContentLoaded', function () {
 });
 
 function menu_ShowOptions () {
-       chrome.tabs.create({url:chrome.extension.getURL("options.html")});
+       chrome.runtime.openOptionsPage();
 }
 
 function menu_ShowAdvancedView() {
index d1eb95ed1c66681431fe0d92636496a1f2466722..ff9a70214882c613a774929e30854b48fe92ed3a 100644 (file)
        "persistent": false,
        "scripts": ["background.js"]
   },
-  "options_page": "options.html",
+  "options_ui": {
+    "page": "options.html",
+    "chrome_style": true
+  },
   "browser_action": {
     "default_icon": "icon_48.png",
        "default_popup": "popup.html"
index 70d614c6b9861dfc0f62bab040326c71628aca7b..4a1402215cd1beca07caa538d76761b4299dec52 100644 (file)
   <body>
   <div id="content">
 
-         <img src="icon.png" style="border: 0; padding: 10px;" /><b>Tabs Backup & Restore - Options</b>
-
-
-
-         <div id="smallDescription">
-         With Tabs Backup & Restore you will never lose your work again!<br /><br />
-         Backup an entire Chrome session (all opened windows and tabs) and restore it when needed.<br />
-         Backups are created automatically, but can also be created manually whenever you want.
-         </div>
-
          <div id="prefs">
 
          <table>
 
                <tr class="prefsRow">
                        <td width="200">Theme</td>
-                       <td>
+                       <td style="white-space: nowrap">
                        <input type="text" id="prefsTheme" hidden>
                        <button id="theme-light">Light</button>
                        <button id="theme-system">System</button>
index c596e7ae8a2a112d73fd6f330b80d0db3ce30b99..313045e21555db2ba30232619664c27e046cd889 100644 (file)
--- a/popup.js
+++ b/popup.js
@@ -34,7 +34,7 @@ document.addEventListener('DOMContentLoaded', function () {
 });
 
 function menu_ShowOptions () {
-       chrome.tabs.create({url:chrome.extension.getURL("options.html")});
+       chrome.runtime.openOptionsPage();
 }
 
 function menu_ShowAdvancedView() {