MCPcopy Index your code
hub / github.com/darkreader/darkreader / getCommands

Function getCommands

src/background/utils/extension-api.ts:160–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158}
159
160export async function getCommands(): Promise<chrome.commands.Command[]> {
161 return new Promise<chrome.commands.Command[]>((resolve) => {
162 if (!chrome.commands) {
163 resolve([]);
164 return;
165 }
166 chrome.commands.getAll((commands) => {
167 if (commands) {
168 resolve(commands);
169 } else {
170 resolve([]);
171 }
172 });
173 });
174}
175
176export function keepListeningToEvents(): () => void {
177 let intervalId = 0;

Callers 1

getShortcutsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected