Skip to content

cState HTML Embed v1.0 - A New Beginning

Latest
Compare
Choose a tag to compare
@mistermantas mistermantas released this 17 Oct 17:41
· 6 commits to main since this release
70cd786

cState alt logo

✔ 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.