← All tools

Toolkit · Site maintenance

Hours Embed

Publish opening hours from one site onto another that can't read it.

Screenshot of Hours Embed

The problem

A restaurant, shop or partner site needs to show hours that live in your main CMS. The browser can't read them because of cross-origin restrictions, so the hours get copied by hand and quietly go stale.

How it works

A scheduled job scrapes the source page server-side — where the cross-origin block doesn't apply — and commits static JSON. The second site reads the file.

Worth knowing

This is the single clearest illustration of the whole approach, and its failure design is the best line in the entire toolkit: if the page structure changes and parsing fails, the script exits non-zero and the last good file stays published.

A layout change upstream degrades to stale but correct, never to blank or wrong. Most integrations do the opposite — they fail open and publish nothing, at the exact moment a visitor is trying to work out whether you're open.

Using it at your organization

  • The parser targets a specific markup structure — expect to adapt it.
  • Theming is entirely CSS variables; it adopts the host page's fonts.
  • The pattern transfers to any cross-origin content you need to mirror.

Stack: Node 20 · GitHub Actions (scheduled) · vanilla JS embed
Licence: MIT — use, modify and redistribute freely, commercially or not.
Hosting: static files; no server required.

Related tools

Built for the Theodore Roosevelt Presidential Library and released for anyone to use. See all 19 tools, or read how the whole system is built.