📄️ feature.self
The feature.self API allows features to view their own data, settings, and more.
📄️ feature.traps
The feature.traps API allows features to access important Scratch API's in the editor.
📄️ feature.msg
This is a function that allows you to get localized strings. Here's an example of how to use it in JavaScript:
📄️ feature.settings
This API deals with the feature's settings and their values.
📄️ feature.tab
This API includes information about the current tab. It's a very simple API that will likely be expanded upon soon. You can adapt the API to any features you make, as changes to the API will likely be accepted.
📄️ feature.getActiveUserstyles
This function returns all the active userstyles. Userstyles are loaded before the rest of the userscripts. Here's an example of how to use the API:
📄️ feature.redux
This API returns the state for the Scratch website. It only works on Scratch 3.0 pages, where React is used. It returns null on Scratch 2.0 pages. Here's an example:
📄️ feature.addEventListener
This API allows you to add listeners to the feature. They are extremely important to dynamic features.
📄️ waitForElement(s)
This is a very, very helpful API that many features use in many different ways. It includes 2 different API's. Both allow you to wait for at least one element that matches a class name.