Skip to main content

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.

This returns to the current path of the Scratch website. Here's an example:

export default async function ({ feature, console }) {
// Logs "/users/rgantzos/" (example).

This returns the page type as an integer. On Scratch 2.0 pages (such as profile pages, statistics page, and my stuff page) the value is 2. On Scratch 3.0 pages (such as the editor, project pages, and homepage) it returns 3.