Browser Context-Menu Shortcuts
A browser context menu is the list that appears when you right-click a page. Scalpel adds a small set of shortcuts to it, such as extracting the page's links or opening its sitemap, and you choose which appear.
Why it matters
A right-click shortcut saves a trip to the toolbar. The browser's native context menu is built by the extensions installed. Adding a few Scalpel shortcuts there lets you audit or extract in one click without opening a popup or navigating anywhere.
Since the menu is built from a toggle you control, it stays short and noise-free. Turn off the shortcuts you never use and only the ones you need are there. On a chrome:// or new-tab page there is nothing to act on, so the menu doesn't appear; it's only live on pages you can actually audit.
How it works
When you right-click on a page, your browser builds a context menu from:
- Built-in items. Back, forward, reload, save page, print.
- Search engine options. "Search Google for…"
- Extension items. Every installed extension can add its own shortcuts.
Scalpel extensions add shortcuts for their primary actions. Scalpel Links, for example, can offer:
Capture links on this page. Extracts every link on the page and populates the link list, just as if you'd opened the popup and let it scan. The popup then opens so you can see the results.
Copy link under cursor. If your cursor is over a link when you right-click, this copies just that link to the clipboard. No popup, no delay; straight to the clipboard.
Each extension's context menu items are controlled by toggles in its settings panel. If you enable both "Capture links on this page" and "Copy link under cursor," both appear as separate menu items. If you enable only one, it shows at the top level (no submenu). If you enable both, they tuck under a submenu labelled "Scalpel Links" to keep the menu clean.
A right-click grants the extension one-off access to the current tab only (the activeTab permission). Nothing runs in the background. The extension doesn't scan or watch your other tabs. A right-click event is the only time the permission activates.
What does not matter
The context menu is not always visible. On a new-tab page, a blank tab, or a non-http(s) page (like file:// or data:), there's nothing to extract, so the menu doesn't appear. That's by design; the shortcuts only appear where they're useful.
Menu clutter. A single enabled shortcut doesn't create a submenu; it sits at the top level. Two or more tuck under the extension's name to keep things tidy. That's a Chrome convenience, not a configuration choice.
Code example
How the context menu works from an extension's perspective:
// When a right-click happens, the extension receives the click event
chrome.contextMenus.create({
id: "capture-links",
title: "Capture links on this page",
contexts: ["page"]
});
// The user clicks the item
chrome.contextMenus.onClicked.addListener((info, tab) => {
if (info.menuItemId === "capture-links") {
// Now the extension can access the current tab's content
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
// Extract links from tabs[0]
});
}
});
In the settings panel, each menu item is toggled on or off:
// User unchecks "Copy link under cursor"
chrome.storage.sync.set({
contextMenu_copyLink: false
});
// Extension rebuilds the context menu
// "Copy link under cursor" is removed
How Scalpel Links shows it
In Scalpel Links settings, the "Context menu" section lists the available shortcuts with toggles:
- Capture links on this page (on by default)
- Copy link under cursor (on by default)
Turn each on or off. The next time you right-click a page, the menu reflects your choices. Try it: enable only one item and right-click a page. One shortcut appears inline. Enable both and a "Scalpel Links" submenu appears with both inside.