Restore Suspended Tabs Without Losing Your Place
Restoring reloads every suspended tab in the current window at once, so they are ready when you need them. It reloads each tab in place and does not switch you away from the tab you are on.
Why it matters
If you have ten suspended tabs and you're about to do something that needs them ready (handing the laptop to someone else, going offline, switching to a video call where you'll need to share a tab), you can restore them all at once instead of clicking through each one.
Restoring is a bulk action that doesn't yank you away from what you're doing. You keep reading the tab you're on while the others load in the background.
How it works
Restore is straightforward. Scalpel asks Chrome to reload every tab in the current window that is currently suspended. A tab is suspended when its renderer process has been torn down by chrome.tabs.discard(). Reloading it means fetching the page from the network and rendering it again.
The reload happens in place. The tab keeps its position in the tab strip, and you stay on the tab you're viewing. You don't see the restore happening unless you look at a specific tab or watch the network in DevTools.
Restore only affects the current window. If you have two browser windows open and restore in one, the other window is untouched.
This is different from clicking a tab. When you click a tab, Chrome switches to it, which means your current tab goes into the background. Restore loads the tabs without switching focus, so you can restore the whole window and keep working.
What does not matter
Restore doesn't un-suspend future tabs. The automatic sweep and the inactivity timer keep running. If you restore ten tabs and then ignore them for an hour, they'll suspend again.
Restore doesn't change your settings. Your timer is still set, your never-suspend list is still there, your exclusions are still on. Nothing is forgotten.
Restore doesn't affect a tab that's already reloading or that's already running. Chrome's reload is idempotent; reloading an active tab just refreshes it.
Code example
Here's how restore works at the extension level:
// Restore all suspended tabs in the active window
async function restoreAllSuspendedTabs() {
// Get the current window
const currentWindow = await chrome.windows.getCurrent();
// Query all tabs in this window
const tabs = await chrome.tabs.query({ windowId: currentWindow.id });
// Find suspended tabs (they have been discarded)
const suspendedTabs = [];
for (const tab of tabs) {
if (tab.discarded) {
suspendedTabs.push(tab);
}
}
// Reload each one
for (const tab of suspendedTabs) {
await chrome.tabs.reload(tab.id);
}
// Log what we did
console.log(`Restored ${suspendedTabs.length} suspended tabs`);
}
// Note: discarded is Chrome's API flag for a suspended tab.
// It's true if chrome.tabs.discard() was called on it.
// Per-tab restore button (single tab)
async function restoreSingleTab(tabId) {
const tab = await chrome.tabs.get(tabId);
if (tab.discarded) {
await chrome.tabs.reload(tabId);
}
}
// Example: restore triggered from popup button
document.getElementById('restoreAllButton').addEventListener('click', () => {
restoreAllSuspendedTabs();
// Don't switch to the restored tabs; stay where the user is
});
How Scalpel shows it
The popup has a "Restore all" button. Click it and every suspended tab in the window reloads in place. You don't switch away. The stats panel updates to show the number of tabs now suspended (should be zero if they all restored successfully).