JS – Ajouter un soin (Supabase)

document.addEventListener(‘DOMContentLoaded’, async () => { const sb = window.supabase; const root = document.querySelector(‘#anm-add-care’); if (!sb || !root) return; // URLs (modifie si besoin) const DASHBOARD_URL = ‘/tableau-de-bord#agenda’; const CREATE_PET_URL = ‘/mon-animours-book’; const elAnimals = root.querySelector(‘#anm-animals’); const elEmpty = root.querySelector(‘#anm-animals-empty’); const…Continue reading

Group Booking Component

let currentId = null; //hello customElements.define(“mx-group-booking”, class extends HTMLElement { constructor() { super(); this.uuid = crypto.randomUUID(); this.timer = null; this.spinnerEl = null; } connectedCallback(){ if (currentId !== this.uuid) { currentId = this.uuid; this.spinnerEl = document.createElement(“div”); this.spinnerEl.style = “width:100%;height:500px;display:grid;place-items:center;”; const spinner…Continue reading

LPSEstimate Only Button 7/17/2025 641PM JAVASCRIPT FOR THE BUTTON

jQuery(function($){ var origin = window.location.origin; var cleanPath = window.location.pathname.replace(/\/$/,”); var targetURL = origin + cleanPath + ‘/L1’; // hide if already on /L1 if ( cleanPath.match(/\/L1$/) ) { $(‘#cma-button’).hide(); return; } $(‘#cma-button’).on(‘click’, function(){ window.location.href = targetURL; }); });Continue reading

LAMA RENTAL Core JavaScript Logic Artifact 7242025 – Copy

/* Rental Search Core JavaScript */ (function (window, document, $) { ‘use strict’; /* ─────────── CONSTANTS ─────────── */ const DEBUG = true; const MIN_RENTAL_COMPS = 3; const EARTH_RADIUS_MI = 3958.8; const NEARBY_ZIPS = [‘33131’, ‘33132’, ‘33139’, ‘33140’, ‘33141’, ‘33027’, ‘33029’];…Continue reading

Force_Fin_LazyMob

document.addEventListener(“DOMContentLoaded”, function() { document.querySelectorAll(‘img.highfetchprio’).forEach(function(img) { img.classList.remove(‘lazyloaded’, ‘lazyload’); img.removeAttribute(‘data-lazy-src’); img.removeAttribute(‘data-lazy-srcset’); img.removeAttribute(‘data-lazy-sizes’); img.setAttribute(‘loading’, ‘eager’); img.setAttribute(‘fetchpriority’, ‘high’); }); });Continue reading

Disable Quantity Field Input Changing on Mouse Scroll

function preventNumberScroll(e) { if (e.target.matches(‘input[type=”number”]’) || e.target.closest(‘input[type=”number”]’)) { e.preventDefault(); } } document.addEventListener(‘wheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘mousewheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘DOMMouseScroll’, preventNumberScroll, { passive: false, capture: true });Continue reading

Remove Specific Campaign Based on the Referral URL- v1

document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading

Remove Specific Campaign Based on the Referral URL-v1

document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading

Remove Specific Campaign From Any URLs Containing a Specific URL Path-v1

document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.search.indexOf(‘shopping-cart’) > -1) { // replace shopping-cart wtih your specific URL path var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID of your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading