PageSourceSearch

https://lesjardinsdelolympe.com/wp-content/cache/min/1/wp-content/…/assets/js/nrv-ct-swap.js?ver=1790996428

js lesjardinsdelolympe.com collected 2026-10-04 03:00:00 UTC 2,813 bytes, 29 lines download raw bytes

1(function(){'use strict';var CFG=window.NRV_CT||{};var MAP=CFG.map||{};var OTHER=CFG.other||null;var DEFAULT=CFG['default']||null;function readNrvTags(){try{var raw=localStorage.getItem('NrvTags');if(!raw){return[]}
2var arr=JSON.parse(raw);return Array.isArray(arr)?arr:[]}catch(e){return[]}}
3function asEntry(e){if(!e){return null}
4if(typeof e==='string'){return{number:e,dest:''}}
5if(typeof e==='object'&&e.number){return{number:String(e.number),dest:e.dest?String(e.dest):''}}
6return null}
7function pickEntry(){var tags=readNrvTags().slice().sort(function(a,b){return(b&&b.time?b.time:0)-(a&&a.time?a.time:0)});var hadSource=!1;for(var i=0;i<tags.length;i++){var key=tags[i]&&tags[i].key;if(!key){continue}
8hadSource=!0;if(MAP[key]){return asEntry(MAP[key])}
9if(key==='google-ads-gmb'&&MAP['google-ads']){return asEntry(MAP['google-ads'])}
10if((key==='facebook-ads'||key==='instagram-ads')&&MAP['meta-ads']){return asEntry(MAP['meta-ads'])}}
11if(hadSource&&OTHER){return asEntry(OTHER)}
12return asEntry(DEFAULT)}
13function normPhone(v){var d=String(v==null?'':v).replace(/[^0-9]/g,'');if(d.indexOf('0033')===0){d=d.slice(2)}else if(d.indexOf('00')===0){d=d.slice(2)}
14if(d.charAt(0)==='0'&&d.length===10){d='33'+d.slice(1)}
15return d}
16function formatFR(e164){var d=String(e164).replace(/[^0-9]/g,'');if(d.indexOf('33')===0&&d.length===11){d='0'+d.slice(2)}
17return d.replace(/(\d{2})(?=\d)/g,'$1 ').trim()}
18function looksLikePhone(txt){return/^[\d\s.\-+()]{6,}$/.test(String(txt).trim())}
19function swap(entry){if(!entry||!entry.number){return}
20var targetNorm=normPhone(entry.dest);if(!targetNorm){return}
21var number=entry.number;var display=formatFR(number);var links=document.querySelectorAll('a[href^="tel:"]');Array.prototype.forEach.call(links,function(a){var orig=a.getAttribute('data-nrv-ct-orig');if(orig===null){orig=a.getAttribute('href')||''}
22if(normPhone(orig.replace(/^tel:/i,''))!==targetNorm){return}
23if(a.getAttribute('data-nrv-ct')===number){return}
24if(!a.hasAttribute('data-nrv-ct-orig')){a.setAttribute('data-nrv-ct-orig',a.getAttribute('href')||'')}
25a.setAttribute('href','tel:'+number);a.setAttribute('data-nrv-ct',number);if(a.children.length===0){if(looksLikePhone(a.textContent)){a.textContent=display}}else{Array.prototype.forEach.call(a.querySelectorAll('*'),function(el){if(el.children.length===0&&looksLikePhone(el.textContent)){el.textContent=display}})}})}
26function run(){swap(pickEntry())}
27if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',run)}else{run()}
28setTimeout(run,800);setTimeout(run,2000);try{var pending=!1;var mo=new MutationObserver(function(){if(pending){return}
29pending=!0;setTimeout(function(){pending=!1;run()},200)});mo.observe(document.documentElement,{childList:!0,subtree:!0});setTimeout(function(){mo.disconnect()},8000)}catch(e){}})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.