A magnifying glass held over a trail of footprints, one print enlarged under the lens
Trusted third parties1 min read

Can I run my own code on my site?

Most of what a site does needs no code of yours: bernard’s own menus, carousels and forms, and the outside tools it has checked. Some sites need more, such as a calculator, a quiz or an animation built for your business. That code can run on your bernard site, on one condition: you approve it first. For everything your site already does without any code of yours, see What can my site do with JavaScript?.

The prompt

“My old site had an interactive calculator. Can it work here?”

Signed in, Get my prompt fills in your site for you. Otherwise press Copy and fill in the [bracketed] parts. First time? Connect your AI to bernard once: Use your own AI (opens in a new tab).

How it works

  1. You ask bernard for the interactive part, in your own words.
  2. bernard prepares the code from your own project and explains it on the Approve code card on your site’s page in bernard: what it does, what it talks to, how big it is and which pages carry it. The code itself is folded away underneath if you want to read it.
  3. You press Approve, or Don’t use. Nothing runs before that.
  4. bernard puts the code into your draft. You check the preview and make it live the usual way.

Approve only if you or someone you trust wrote it, or you have read it.

What stays bernard’s

Your pages stay bernard pages. Your menus, the cookie choices your visitors make and your editing all keep working, and the code only runs inside the boxes it was placed in. If bernard moves your site again later, it puts the boxes back by itself.

Turning it off

The card for approved code has a Turn off button. Use it if anything looks wrong. The code stops reaching visitors within the hour, with nothing to publish.

Questions people ask

Who decides whether the code runs?
You do. bernard shows you what the code does, what it talks to and which pages carry it. It runs only after you press Approve, and only you, the account owner, can press it.
Can I change my mind?
Yes. Press Turn off on the same card. Visitors stop getting it within the hour, and bernard takes it off your pages in the draft.
Does my site still look like my site if the code fails?
Yes. Every piece of your own code sits inside a box on a normal bernard page. If the code does not load, visitors see the page as it is, and you can still edit the words around it.
Is this on for everyone?
Not yet. It is switched on for some accounts while bernard finishes the extra safety work it wants in place first. Ask bernard whether yours has it.

Next