MCPcopy Create free account
hub / github.com/Eltaurus-Lt/CourseDump2022 / getCurrentTab

Function getCurrentTab

menu.js:130–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128}
129
130async function getCurrentTab() {
131 try {
132 const tabQuery = await chrome.tabs?.query({ active: true, currentWindow: true });
133 if (Array.isArray(tabQuery) && tabQuery.length > 0) {
134 return tabQuery[0];
135 }
136 } catch (error) {
137 console.error(error);
138 }
139}
140
141function saveToStorage(data) {
142 chrome.storage.local.set(data);

Callers 1

menu.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected