Skip to main content
Every script starts with a ready-made interface: a floating button that opens a popup, with cards inside it. Everything lives in a Shadow DOM, so the site’s CSS does not get in and yours does not leak out.

Theme (src/ui/theme.js)

This is the only place to change colors and shapes. The panel’s visual editor writes this file in a commit.

Create a card

createPopup(root, { title }) returns { body, open(), close(), toggle() }. To switch screens, clear it with popup.body.replaceChildren() and build the cards again. The popup has role="dialog", aria-modal, focuses the Close button when it opens and closes on Esc.

window.DoglyScript

On the page, DoglyTdc gives the script: The template uses config.welcome as the text of the first card, if you set that key in the remote configuration.

Don’t break it

  • Keep everything inside the Shadow DOM (root).
  • Use textContent, never innerHTML with text from the site.
  • Classes start with dts-.
  • Respect prefers-reduced-motion.