diff options
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 70d97ca0..78bfce4c 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -235,6 +235,15 @@ BackgroundCommands =      tabIds = BgUtils.tabRecency.getTabsByRecency().filter (tabId) -> tabId != tab.id      if 0 < tabIds.length        selectSpecificTab id: tabIds[(count-1) % tabIds.length] +  reload: ({count, tabId, registryEntry, tab: {windowId}})-> +    bypassCache = registryEntry.options.hard ? false +    chrome.tabs.query {windowId}, (tabs) -> +      position = do -> +        for tab, index in tabs +          return index if tab.id == tabId +      tabs = [tabs[position...]..., tabs[...position]...] +      count = Math.min count, tabs.length +      chrome.tabs.reload tab.id, {bypassCache} for tab in tabs[...count]  # Remove tabs before, after, or either side of the currently active tab  removeTabsRelative = (direction, {tab: activeTab}) -> | 
