/* Add custom JS code below */ /* ===== Safe Cam · Figma theme (custom.js) ===== */ /* سيف كام Safe Cam — Raed (old) · custom JS. Only what CSS cannot do. Safe to run more than once. Arabic + English: any text added here has both versions (t('ar','en')). */ (function () { 'use strict'; var lang = (document.documentElement.lang || 'ar').slice(0, 2); var t = function (ar, en) { return lang === 'ar' ? ar : en; }; var GREEN = '#014b28'; var DARK = '#012d18'; // Figma: the video panel's title/feature titles use a darker green /* ---- 00 · Loading screen: reveal the page once it has loaded and our late sections are in place ---- */ (function () { var b = document.body, done = false; if (!b) return; var hide = function () { if (!done) { done = true; b.classList.add('cx-ready'); } }; var ready = function () { if (document.readyState !== 'complete') return false; if (!b.classList.contains('index')) return true; /* home: wait for the video panel to be built (the section that moves the most) */ return !document.querySelector('.s-block--bundle-product-features-list') || !!document.querySelector('.cx-video-panel'); }; var tick = function () { if (done) return; var t = performance.now(); if ((ready() && t > 700) || t > 3500) return setTimeout(hide, 150); setTimeout(tick, 100); }; tick(); })(); function onEach(selector, fn, key) { key = key || 'cx'; var run = function (root) { if (!root.querySelectorAll) return; root.querySelectorAll(selector).forEach(function (el) { if (el.dataset[key + 'Done']) return; el.dataset[key + 'Done'] = '1'; try { fn(el); } catch (e) { console.error('[custom]', selector, e); } }); }; run(document); new MutationObserver(function (muts) { muts.forEach(function (m) { m.addedNodes.forEach(function (n) { if (n.nodeType === 1) run(n.parentNode || document); }); }); }).observe(document.body, { childList: true, subtree: true }); } /* inject a