Docsfrontbacked.js reference
On this page

Skins and support reference

Choose skins and open the support launcher.

Method signatures

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Before you begin: Navigation reference.

Skin Helpers

Frontbacked.getSkin() returns the active skin selection, including current mode details when the site provides skin metadata.

Frontbacked.listSkins() returns the available skin catalog for the current site.

Frontbacked.setSiteSkin(skinId, options?) updates the site-selected skin for admins with edit permission, then applies the returned skin without storing a visitor override.

Frontbacked.skins.current(), Frontbacked.skins.list(), Frontbacked.skins.setSiteSkin(...), Frontbacked.skins.setMode(...), and Frontbacked.skins.toggleMode() are namespace aliases for theme UIs that group skin controls under one object.

Frontbacked.setSkinMode(mode) sets the current skin mode preference. mode can be a concrete mode such as "dark" or a comma-separated fallback such as "system,dark". Frontbacked stores the preference in localStorage, writes a fb_skin_mode cookie, and reloads the page so the next render matches the selected mode.

Frontbacked.toggleSkinMode() cycles through available modes for the selected skin, updates storage/cookie state, and reloads the page. It returns the current skin selection when no modes are available.

Support Launcher Helpers

Frontbacked.supportLauncher.init(root?) scans a document or element for support launcher bindings. Most themes do not need to call it manually because Frontbacked.init() wires support controls during page setup.

Frontbacked.supportLauncher.open(key?), .close(key?), and .toggle(key?) control the reusable floating support launcher. When visible WhatsApp or Telegram contacts exist in $siteInfo, the launcher presents contact choices before falling back to native site chat.

Frontbacked.supportLauncher.contacts() returns the public support contact values from $siteInfo, including WhatsApp, Telegram, and site name.

Frontbacked.supportLauncher.whatsappUrl(contact?, message?) and Frontbacked.supportLauncher.telegramUrl(contact?, message?) build contact links when a theme wants to render its own support buttons.

Frontbacked.supportLauncher.telegramSupportsDraft(contact?) returns whether a Telegram contact can open with a typed draft message. Username and phone contacts support drafts; unsupported Telegram links open directly.

Frontbacked.support.open(...), .close(...), .toggle(...), and .contacts() are shorter aliases for the launcher helpers.

Continue with Images reference.