What can my site do with JavaScript?
People ask this in different words: why did my slider stop, can you add a countdown, can you write me a little script. The honest answer is that your site does plenty, and none of it involves anyone writing code for you.
The prompt
“The menu button on [the page] does nothing when I tap it on my phone. Fix it and show me before it goes live.”
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).
There are three ways something can run on a bernard page, and all three are bernard’s own.
1. Built-in behaviours
bernard owns a small set of tested pieces - the ones almost every site needs - and switches one on with a marker in the page. No code is written, so there is nothing to go wrong quietly.
| What you want | How to ask |
|---|---|
| A menu button that opens and closes | “The menu button on my phone does nothing. Fix it.” |
| A carousel of photos or quotes | “Turn the three photos on the home page into a carousel with arrows.” |
| Hover effects that came across broken | Automatic. Nothing to ask. |
| Content that arrived invisible after a move | Automatic. Nothing to ask. |
| A contact or enquiry form | “Add a contact form to the About page.” |
The last two are worth knowing about even though there is nothing to do: when a site moves, hover effects and fade-in content often depended on the old site’s code, and bernard rebuilds both as it imports. If something on a moved page still looks wrong, say which page and what you expected.
One limit worth knowing. These behaviours work on the pages that came across with your site, which is where bernard put them as it imported. A brand-new page your AI writes from scratch does not have them yet, so a menu button on a new page will not open until bernard adds the behaviours to new pages as well. Ask your AI to check it by using it rather than by looking at it, and if it is a new page it will tell you and build the same thing a different way meanwhile.
2. Checked outside tools
Diagrams, charts, a PDF viewer, a photo lightbox, code samples, mathematics and a swipeable carousel come from well-known makers, and bernard runs them from a checked list at a pinned version. See Embed a calendar, a diagram, a chart or another tool on my site for what is on the list today, what is waiting, and how to ask for something that is not.
3. Tracking and chat tags
Google Analytics, the Facebook pixel, Clarity, Plausible, Fathom and Intercom are not put into your pages at all - bernard serves them from its own side, and only to visitors who have agreed to cookies. Ask for the one you want and give the id your provider shows you. Never paste the snippet: it would be removed, and the id alone is all bernard needs.
And a fourth thing that is not code at all
Accordions, tabs, a menu that opens on tap, a panel that shows when you click: much of what people call “interactive” needs no program at all, just the right markup. bernard reaches for that first, because it works on every device, with no loading, and cannot break.
Why the rule exists
A website that will run whatever it is handed is a website that gets broken into, and the damage lands on your visitors rather than on you. Keeping everything that runs inside a small tested set is what lets bernard promise your site is safe and actually mean it. The cost is that “write me a quick script” is not on the menu. The benefit is that nothing on your site is code nobody read.
Ask for the outcome, not the method. You will usually get it, and when you cannot, you will be told why and the request will go to the people who can add it.
Questions people ask
- Can bernard write a small script for me?
- No, and that is on purpose rather than a limitation of the day. Code written on request is exactly how a site quietly becomes unsafe, and nobody would be reading it. bernard uses its own tested pieces instead, and every change lands on a preview you approve.
- Why did my slider stop working after the move?
- Your old site ran its own code to move the slides, and that code did not come across. bernard puts its own carousel in its place, so the slides move again. If one on your site is still stuck, ask and it gets wired up.
- Can I add my payment provider’s button?
- Stripe and PayPal buttons are checked and on the waiting list. They set cookies, so they need one more piece of bernard’s cookie-consent system before they switch on. Ask and bernard will tell you when it is ready.
- How do I ask for something new?
- Describe what you want the page to do, in your own words. If there is a way today, bernard does it. If there is not, it files the request with the people who build bernard and tells you plainly that it has.
- Does my analytics still work?
- Yes. Analytics, advertising and chat tags are added a different way, from bernard’s side rather than into the page, and they only run for visitors who agree to cookies.