From 2e8ac9c4847d0088443b5d961c44096c293cd1c0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 26 Oct 2014 21:55:22 +0000 Subject: Reduce max removeTab to chrome.session.MAX_SESSION_RESULTS. --- background_scripts/commands.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 4bb6255e..0ade35ec 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -318,7 +318,9 @@ commandDescriptions = createTab: ["Create new tab", { background: true, repeatLimit: 20 }] duplicateTab: ["Duplicate current tab", { background: true, repeatLimit: 20 }] - removeTab: ["Close current tab", { background: true, repeatLimit: 50 }] + removeTab: ["Close current tab", { background: true, repeatLimit: + # Require confirmation to remove more tabs than we can restore. + (if chrome.session then chrome.session.MAX_SESSION_RESULTS else 25) }] restoreTab: ["Restore closed tab", { background: true, repeatLimit: 20 }] moveTabToNewWindow: ["Move tab to new window", { background: true }] -- cgit v1.2.3