Skip to content

Commit 30e6d2e

Browse files
committed
サイドパネルの設定を修正
1 parent a3d9383 commit 30e6d2e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/background.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
chrome.runtime.onInstalled.addListener(() => {
22
console.log("拡張機能がインストールされました!");
3-
chrome.sidePanel.setOptions({
4-
path: "sidepanel/index.html",
5-
enabled: true,
6-
});
73
});
84

95
// ツールバーアイコンをクリックしたときにサイドパネルを開く
106
chrome.action.onClicked.addListener(async (tab) => {
11-
await chrome.sidePanel.open({ windowId: tab.windowId });
7+
await chrome.sidePanel.open({ windowId: tab.windowId, tabId: tab.id });
128
});

src/sidepanel/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html>
33
<head>
44
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)