Skip to content

clockwork.js

LukasExists edited this page May 13, 2023 · 2 revisions

Warning: Work in Progress

This page is a work in progress! Info may change or be inaccurate, so be ready.

You can easily find important update notes for Clockwork in the #beta-announcements channel of the Redstone Network Discord server.


class Clockwork

The class that contains all the functions of Clockwork.

Clockwork.isInClockwork

Returns true if an ID has been received and the website is embedded, and false otherwise. May take some time to update from false to true at the start, as ID receiving is not instant.

Clockwork.installApp(string: url)

permission: installApp

Sends a prompt to Clockwork, asking if the user wants to install an app. Similar to installTheme.

Clockwork.installTheme(string: url)

permission: installTheme

Sends a prompt to Clockwork, asking if the user wants to install an theme. Similar to installApp.

Clockwork.sendNotification(string: content)

permission: notifications

Sends a notification to Clockwork, with the title being the title of your app.

Clockwork.isEmbedded DEPRECATED

THIS PROPERTY IS DEPRECATED AND IS ONLY KEPT FOR COMPATIBILITY PURPOSES! Please use Clockwork.isInClockwork for future projects.

Returns true if embedded, and false if not. Currently cannot check if it is embedded in Clockwork.