📄️ Storage
ScratchTools.Storage contains all the settings options for ScratchTools. For example, the font selected for Custom Website Font. It can be accessed by any feature running in the main world. It also updates dynamically, meaning changes saved in the settings will also update all open pages. All keys in this API are available to all features, so options for one feature can be viewed by all other features.
📄️ waitForElements
ScratchTools.waitForElements is a function with 4 parameters:
📄️ setDisable
For dynamic features, it's important that they have the ability to clean up the changes that they've made to a page. Check this out for more information on dynamic features.
📄️ disable
This function is mostly used by the settings scripts when they need to disable a feature on a page. If a feature is dynamic, then the function will remove the feature from the page that it is run on. If the page is reloaded and the feature is still enabled in the settings, it will reappear. Here's how to use it:
📄️ Session and Auth
There are two similar API's, but one is a function and the other is an object.
📄️ console
ScratchTools.console includes 3 functions:
📄️ Scratch
There are multiple API's wrapped into ScratchTools.Scratch. Here they are:
📄️ cookies
The ScratchTools.cookies API controls the access to cookies on the Scratch website. It's a pretty simple API, but it can be really helpful at times. You can use it like this:
📄️ addToSpace
There are many spaces on the Scratch website that features commonly add elements to. This includes above the stage, in the navbar, and in the account dropdown. This API makes it extremely easy to quickly add elements to those places, using a series of already-known selectors.