Skip to content

Commit

Permalink
Small fixes for context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kepano committed Sep 22, 2024
1 parent 1ecf687 commit 1d67526
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/background-firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
});

browser.runtime.onInstalled.addListener(() => {
browser.action.onClicked.addListener((tab) => {
if (tab.id) {
browser.tabs.sendMessage(tab.id, { action: "ping" });
}
});

function createContextMenu() {
browser.contextMenus.create({
id: "open-obsidian-clipper",
Expand All @@ -77,7 +71,7 @@ browser.runtime.onInstalled.addListener(() => {

browser.contextMenus.onClicked.addListener((info, tab) => {
if (info.menuItemId === "open-obsidian-clipper") {
browser.browserAction.openPopup();
browser.action.openPopup();
}
});

Expand Down
8 changes: 1 addition & 7 deletions src/background-safari.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
});

browser.runtime.onInstalled.addListener(() => {
browser.action.onClicked.addListener((tab) => {
if (tab.id) {
browser.tabs.sendMessage(tab.id, { action: "ping" });
}
});

function createContextMenu() {
browser.contextMenus.create({
id: "open-obsidian-clipper",
Expand All @@ -77,7 +71,7 @@ browser.runtime.onInstalled.addListener(() => {

browser.contextMenus.onClicked.addListener((info, tab) => {
if (info.menuItemId === "open-obsidian-clipper") {
browser.browserAction.openPopup();
browser.action.openPopup();
}
});

Expand Down

0 comments on commit 1d67526

Please sign in to comment.