Scalpel Tags right-click menu
The right-click menu adds two shortcuts to any page. One opens Scalpel Tags on that tab so you can inspect its tags. The other toggles preserve log, keeping the capture across page loads. Turn each item on or off in the popup settings.
Why it matters
Some workflows need quick access without reaching for the keyboard or clicking the toolbar button. The right-click menu puts Scalpel Tags a single click away, anywhere on any page. This is especially useful when you're deep in a flow and want to pause capture or open the panel without breaking focus.
How it works
Scalpel Tags registers two context menu items using the Chrome contextMenus API. Both items appear when you right-click on any http or https page. They read from the same settings registry that controls the popup, so your choices stay consistent across all surfaces.
The first item, "Inspect tags on this page," opens Scalpel Tags on the current tab. The extension passes the tab ID through to ensure it listens on the right page. The second item, "Toggle preserve log," reuses the same logic as the keyboard shortcut, toggling the preserve-log setting without opening the panel at all.
What does not matter
The menu items only appear on regular web pages. Local files and extension pages (chrome://, about:, etc.) get no context menu. This is a Chrome restriction, not a choice by Scalpel Tags, so it applies equally to all extensions.
Code example
Under the hood, registering a context menu item looks like this:
chrome.contextMenus.create({
id: "inspect-tags",
title: "Inspect tags on this page",
contexts: ["page"],
});
When a user clicks it, the extension listens for the click:
chrome.contextMenus.onClicked.addListener((info, tab) => {
if (info.menuItemId === "inspect-tags") {
chrome.tabs.sendMessage(tab.id, { action: "openPanel" });
}
});
How Scalpel Tags shows it
Scalpel Tags builds its context menu from the same registry that powers the popup settings. The "Inspect tags on this page" item opens the side panel on the current tab. The "Toggle preserve log" item updates the setting instantly without any UI, so you can keep watching as you navigate. Both menu items can be toggled on or off in the popup settings under "Advanced," and the menu rebuilds immediately with no page reload needed.