Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 1.16 KB

scheme.md

File metadata and controls

11 lines (6 loc) · 1.16 KB

This code appears to define an immediately invoked function expression (IIFE) that is passed an anonymous function as an argument. The anonymous function takes a single parameter, e.

Inside the function, an empty object named t is defined. Then, a function named r is defined. r takes a single parameter, n.

The function r has several conditional statements and function calls inside it. It appears to be a module loader of some sort, possibly for loading JavaScript modules.

There is only one entry point to the module, at the index 833. The code at this index defines an anonymous function and immediately invokes it.

This anonymous function appears to use the window.matchMedia function to create a media query that checks if the user's preferred color scheme is set to "dark". It then sets up an event listener that listens for changes to the media query and sends a message to the chrome.runtime when a change is detected. The message contains a type field set to a constant named SET_SCHEME, and a scheme field set to either "dark" or "light" depending on the value of the matches field in the event object.

It is not clear what the purpose of this code is without more context.