Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 2.66 KB

annotate.md

File metadata and controls

17 lines (9 loc) · 2.66 KB

This JavaScript file appears to be a Chrome extension that listens for messages from the extension runtime and annotates the screen in response to certain messages.

The main function of the extension is defined within an anonymous self-executing function that takes an argument e. Inside this function, a variable t is defined as an empty object, and a function n is defined.

The n function takes an argument o. It checks whether t[o] is truthy, and if it is, it returns t[o].exports. Otherwise, it creates an object r with properties i, l, and exports, and assigns it to t[o]. It then calls the function at e[o] with the arguments r, r.exports, and n, sets r.l to true, and returns r.exports.

The n function is then used to define properties on itself. n.m is set to e, n.c is set to t, and n.d is set to a function that takes three arguments: e, t, and o. This function checks whether n.o(e, t) is falsy, and if it is, it defines a property on e with the name t and the specified configurable, enumerable, and getter attributes.

The n.r function is defined to take an argument e and set the **esModule property on e to true. The n.n function is defined to take an argument e and return either the default export of e if it has a **esModule property that is truthy, or the value of e itself if not. The n.o function is defined to take two arguments e and t and return the result of calling Object.prototype.hasOwnProperty.call with e and t as arguments. n.p is set to an empty string. Finally, the self-executing function calls n with the argument 834.

Inside the object passed as the argument to the self-executing function, there is a key-value pair with the key 834 and a value that is a function. This function defines a number of variables and functions, and sets up event listeners.

The first variable, r, is an object with properties all, position, and pointer-events, all set to specific string values. The second variable, i, is an object that is created by merging r and an object with specific values for the properties contain, left, top, width, height, and z-index.

The function then defines an arrow function a that takes an argument e. It creates a div element and sets its style based on the properties and values of an object created by calling a function with e as an argument. It then creates a second div element and sets its style based on the properties and values of i. The first div element is appended to the second, and the second is appended to the body element of the current document. A timeout is then set to remove the second div from the body after a certain amount of time.

The code then sets up a event listener for messages from the extension runtime. If the message type is `