MCPcopy Create free account
hub / github.com/SKVNDR/FastDork / openFastDorkSidePanel

Function openFastDorkSidePanel

Script/FastDork.js:1837–1858  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1835 }
1836
1837 async function openFastDorkSidePanel() {
1838 if (!chrome.sidePanel?.open) {
1839 throw new Error("Chrome side panel is not available in this browser.");
1840 }
1841
1842 const [activeTab] = await chrome.tabs.query({
1843 active: true,
1844 currentWindow: true,
1845 });
1846
1847 if (typeof activeTab?.windowId === "number") {
1848 await chrome.sidePanel.open({ windowId: activeTab.windowId });
1849 return;
1850 }
1851
1852 if (typeof activeTab?.id === "number") {
1853 await chrome.sidePanel.open({ tabId: activeTab.id });
1854 return;
1855 }
1856
1857 throw new Error("Could not find the current Chrome window.");
1858 }
1859
1860 async function loadSidePanelPreference() {
1861 if (!UI.sidePanelToggle) return;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected