Documentation

Ship code to any site, instantly.

Logic Bomb gives you a single <script> tag that hot-loads HTML, CSS, and JavaScript onto any page you add it to. This guide walks you through everything in under five minutes.

Step 0

Getting started

  1. 1

    Create a client

    Open the dashboard and click New Client. Each client represents one injection target — typically one website. We generate a uniqueslug for it.

  2. 2

    Write your code

    Click your new client to open the editor. You get three Monaco editors: HTML, CSS, and JavaScript. Edit. Hit save.

  3. 3

    Drop in the tag

    Copy the script tag from the client's row and paste it into the <head> of any page. That's it — your code is now live.

What you ship

The script tag

Every client gets a single tag. Drop it on any site and your HTML, CSS, and JavaScript will be injected at runtime.

html
<script src="https://your-domain.com/api/script/your-slug.js" async></script>

The async attribute means the tag never blocks page rendering. The script bundle is small (< 5KB gzipped) and is cached at the edge.

Where you write code

The three editors

Each client has three independent editors. They're saved together, but injected differently:

HTML

Inserted into the element matching your target selector (default: body).

CSS

Appended as a <style> tag in the document <head>. Scoped to the page, not isolated.

JS

Runs in page context after HTML & CSS injection. Has full access to the host site's DOM and globals.

Where the HTML lands

Target selectors

Your HTML can land anywhere on the page. Use any valid CSS selector to target the parent element your HTML will be inserted into.

text
body                 → appended to <body> (default)
#root                → into the React mount point
.product-grid > *    → into the first matched grid
[data-slot="cta"]    → into a custom data-slot

If the selector doesn't match anything, the script logs a warning and falls back to body.

How fast updates go live

Caching & propagation

Saved scripts are cached at the edge with stale-while-revalidate. Visitors get the cached version instantly while a fresh build downloads in the background.

  • P50 propagation: ~10 seconds globally
  • P99 propagation: under 30 seconds
  • Force refresh: add ?v=<timestamp> to bust the cache immediately
When things go sideways

Troubleshooting

My script isn't appearing on the page
Open DevTools and confirm the <script> tag actually loaded — look for it in the Network tab. If the request 404s, double-check the slug.
HTML is injected but in the wrong spot
Your target selector probably matches multiple elements (we use the first one), or matches before the element exists. Try a more specific selector.
My CSS isn't overriding the host site's styles
Bump specificity, or wrap rules in a unique parent class. CSS is injected last, but specificity still wins.
JavaScript errors in the console
Your JS runs in page context. Globals from the host site are available — but so are its conflicts. Wrap your code in an IIFE if you need scope isolation.

Ready to ship?

Create your first client and grab your script tag.

Open the dashboard