✔ The basic JavaScript code for checking if a cState-powered status page (using its read-only API).
There is no UI for this project, so you are you free to write that yourself or contribute so others can use it.
The index.js
file has the JavaScript you can add to your page and use for making other things happen.
Prerequisites
- You have a cState status page set up with a read-only API
- You have modified your headers (for Netlify users, it's the
netlify.toml
file in the root) to allow for cross-origin access - Your browser (or environment) supports
fetch()
The demo page uses this for its netlify.toml
:
[[headers]]
for = "/*.json"
[headers.values]
Access-Control-Allow-Origin = "*"
Thank you
The idea for this project was originally inspired by the GitHub / cState user @ririko5834.