Move to side panel

This commit is contained in:
Oliver Dunk
2024-11-22 16:13:44 +00:00
parent 6b4db6a6c0
commit 647a874cbb
5 changed files with 12 additions and 5 deletions

View File

@@ -0,0 +1,3 @@
chrome.runtime.onInstalled.addListener(() => {
chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true });
});

View File

@@ -8,9 +8,13 @@
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"action": {
"default_popup": "popup.html"
"background": {
"service_worker": "background.js"
},
"action": {},
"side_panel": {
"default_path": "sidepanel.html"
},
"host_permissions": ["https://developer.chrome.com/*"],
"permissions": ["tabGroups"]
"permissions": ["tabGroups", "sidePanel"]
}

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./popup.css" />
<link rel="stylesheet" href="./sidepanel.css" />
</head>
<body>
<template id="li_template">
@@ -20,6 +20,6 @@
<button>Group Tabs</button>
<ul></ul>
<script src="./popup.js" type="module"></script>
<script src="./sidepanel.js" type="module"></script>
</body>
</html>