MCPcopy
hub / github.com/philc/vimium / getTabsByRecency

Method getTabsByRecency

background_scripts/tab_recency.js:131–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130 // Returns a list of tab Ids sorted by recency, most recent tab first.
131 getTabsByRecency() {
132 if (!this.loaded) throw new Error("TabRecency hasn't yet been loaded.");
133 const ids = Object.keys(this.tabIdToCounter);
134 ids.sort((a, b) => this.tabIdToCounter[b] - this.tabIdToCounter[a]);
135 return ids.map((id) => parseInt(id));
136 }
137}
138
139export { TabRecency };

Callers 2

visitPreviousTabFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected