Current location - Training Enrollment Network - Books and materials - What can the oil monkey plug-in do? ,,
What can the oil monkey plug-in do? ,,
Oil monkey script is a free browser extension and the most popular script manager for users. Chrome,? Microsoft Edge? Safari,? Next is the opera, and then what? Firefox browser. It can change the layout, appearance and operation of a website or webpage through the simplest script.

Greasemonkey, GM for short, commonly known as "oil monkey" in Chinese, is an add-on component of Mozilla Firefox. It allows users to install some scripts, which makes it easier and easier for most HTML-based web pages to be changed directly at the client. Because the Greasemonkey script is resident in the browser, it will be automatically modified every time the destination page is opened, so that users who run the script can deeply enjoy its fixed convenience.

Greasemonkey can add some new functions to a webpage, correct webpage errors, merge data from different webpages, or other functions that are too many to load. A well-written Greasemonkey script can even seamlessly integrate its output with the modified page, just like a part of the original web page.

Technical details

Most Greasemonkey user scripts are written by themselves, using JavaScript code specific to a certain website to manipulate the content of web pages through the document object model (DOM) interface. Maintains a Greasemonkey database which describes which URL page corresponds to which script. (Note: There may be many abandoned script warehouses that have not been merged into the new warehouse).

When the user loads the matching webpage, Greasemonkey calls the relevant script, and the script adds the output result to the page, deletes the part of the page, or moves the ugly part. The Greasemonkey script can also query external HTTP resources through non-domain bound XMLHTTP requests.

Greasemonkey also follows the format of user name. User.js, which allows Greasemonkey to automatically detect and provide installation options when a specific user visits. In addition to JavaScript code, the Greasemonkey script also includes a limited set of optional data. The following data set describes the script name, the script description, the address space used by websites to distinguish scripts with the same name, and the list of websites where the scripts were originally written.