MCPcopy
hub / github.com/darkreader/darkreader / responseHandler

Function responseHandler

src/inject/index.ts:50–58  ·  view source on GitHub ↗
(response: MessageBGtoCS | 'unsupportedSender' | undefined)

Source from the content-addressed store, hash-verified

48 return;
49 }
50 const responseHandler = (response: MessageBGtoCS | 'unsupportedSender' | undefined) => {
51 // Vivaldi bug workaround. See TabManager for details.
52 if (response === 'unsupportedSender' || response?.type === MessageTypeBGtoCS.UNSUPPORTED_SENDER) {
53 removeStyle();
54 removeSVGFilter();
55 removeDynamicTheme();
56 cleanup();
57 }
58 };
59
60 try {
61 if (__CHROMIUM_MV3__) {

Callers

nothing calls this directly

Calls 4

removeStyleFunction · 0.90
removeSVGFilterFunction · 0.90
removeDynamicThemeFunction · 0.90
cleanupFunction · 0.70

Tested by

no test coverage detected