Skip to content

Commit f4860d4

Browse files
committed
Remove right click context menu
1 parent 8cdb06d commit f4860d4

2 files changed

Lines changed: 28 additions & 29 deletions

File tree

src/ext/bg.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ async function checkAndTrackArchiveSize() {
7676
function main() {
7777
chrome.action.setBadgeBackgroundColor({ color: "#4d7c0f" });
7878

79-
chrome.contextMenus.create({
80-
id: "toggle-rec",
81-
title: "Start Recording",
82-
contexts: ["browser_action"],
83-
});
84-
chrome.contextMenus.create({
85-
id: "view-rec",
86-
title: "View Web Archives",
87-
contexts: ["all"],
88-
});
79+
// chrome.contextMenus.create({
80+
// id: "toggle-rec",
81+
// title: "Start Recording",
82+
// contexts: ["browser_action"],
83+
// });
84+
// chrome.contextMenus.create({
85+
// id: "view-rec",
86+
// title: "View Web Archives",
87+
// contexts: ["all"],
88+
// });
8989
}
9090
// Side panel
9191
chrome.sidePanel
@@ -487,24 +487,24 @@ chrome.tabs.onRemoved.addListener((tabId) => {
487487

488488
// ===========================================================================
489489
// @ts-expect-error - TS7006 - Parameter 'info' implicitly has an 'any' type. | TS7006 - Parameter 'tab' implicitly has an 'any' type.
490-
chrome.contextMenus.onClicked.addListener((info, tab) => {
491-
switch (info.menuItemId) {
492-
case "view-rec":
493-
chrome.tabs.create({ url: chrome.runtime.getURL("index.html") });
494-
break;
495-
496-
case "toggle-rec":
497-
if (!isRecording(tab.id)) {
498-
if (isValidUrl(tab.url, skipDomains)) {
499-
// @ts-expect-error - TS2554 - Expected 2 arguments, but got 1.
500-
startRecorder(tab.id);
501-
}
502-
} else {
503-
stopRecorder(tab.id);
504-
}
505-
break;
506-
}
507-
});
490+
// chrome.contextMenus.onClicked.addListener((info, tab) => {
491+
// switch (info.menuItemId) {
492+
// case "view-rec":
493+
// chrome.tabs.create({ url: chrome.runtime.getURL("index.html") });
494+
// break;
495+
496+
// case "toggle-rec":
497+
// if (!isRecording(tab.id)) {
498+
// if (isValidUrl(tab.url, skipDomains)) {
499+
// // @ts-expect-error - TS2554 - Expected 2 arguments, but got 1.
500+
// startRecorder(tab.id);
501+
// }
502+
// } else {
503+
// stopRecorder(tab.id);
504+
// }
505+
// break;
506+
// }
507+
// });
508508

509509
// ===========================================================================
510510
// @ts-expect-error - TS7006 - Parameter 'tabId' implicitly has an 'any' type. | TS7006 - Parameter 'opts' implicitly has an 'any' type.

src/ext/manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"version": "$VERSION",
55
"permissions": [
66
"debugger",
7-
"contextMenus",
87
"tabs",
98
"activeTab",
109
"storage",

0 commit comments

Comments
 (0)