MCPcopy
hub / github.com/darkreader/darkreader / getMessengerAdapter

Method getMessengerAdapter

src/background/extension.ts:268–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

266 }
267
268 private static getMessengerAdapter(): ExtensionAdapter {
269 return {
270 collect: async () => {
271 return await Extension.collectData();
272 },
273 collectDevToolsData: async () => {
274 return await Extension.collectDevToolsData();
275 },
276 changeSettings: Extension.changeSettings,
277 setTheme: Extension.setTheme,
278 toggleActiveTab: Extension.toggleActiveTab,
279 markNewsAsRead: Newsmaker.markAsRead,
280 markNewsAsDisplayed: Newsmaker.markAsDisplayed,
281 loadConfig: ConfigManager.load,
282 applyDevFixes: DevTools.applyFixes,
283 resetDevFixes: DevTools.resetFixes,
284 startActivation: Extension.startActivation,
285 resetActivation: Extension.resetActivation,
286 hideHighlights: UIHighlights.hideHighlights,
287 };
288 }
289
290 private static onCommandInternal = async (command: Command, tabId: number | null, frameId: number | null, frameURL: string | null) => {
291 if (Extension.startBarrier!.isPending()) {

Callers 1

initMethod · 0.80

Calls 2

collectDataMethod · 0.80
collectDevToolsDataMethod · 0.80

Tested by

no test coverage detected