PageSourceSearch

https://tempero.fr/cdn/shop/t/2/assets/COMMON.tools.js?v=65830568379309520071702993165

js tempero.fr collected 2026-09-26 14:32:23 UTC 6,191 bytes, 2 lines download raw bytes

1window._TOOLS={DATE_NOW:new Date,templateStr:function(str,data){for(var k in data)str=str.split("%"+k+"%").join(data[k]);return str},dayDiff:function(d1,d2,isString){isString=!!isString,d1=_TOOLS.strToDate(d1),d2=_TOOLS.strToDate(d2);var day=3600*24*1e3;return Math.floor((d2.getTime()-d1.getTime())/day)},dateDiff(date1,date2){var diff={},tmp=date2-date1;return tmp=Math.floor(tmp/1e3),diff.sec=tmp%60,tmp=Math.floor((tmp-diff.sec)/60),diff.min=tmp%60,tmp=Math.floor((tmp-diff.min)/60),diff.hour=tmp%24,tmp=Math.floor((tmp-diff.hour)/24),diff.day=tmp,diff},_scrollTo:function(id){var e=document.getElementById(id),box=e.getBoundingClientRect();window.scrollBy(0,box.top)},scrollTo:function(id,delay){delay=delay||500;var e=document.getElementById(id),box=e.getBoundingClientRect(),k,inc;for(inc=box.top>=0?1:-1,k=0;k<49;k++)setTimeout(function(){_TOOLS._scrollTo(id),window.scrollBy(0,Math.floor(box.top/delay/10))},10*k);setTimeout(function(){_TOOLS._scrollTo(id)},500)},isIntervalDate:function(date,intervals){if(!date||intervals==="|")return!0;intervals[0]===","&&(intervals=intervals.substring(1)),intervals[0]==="|"&&intervals[1]===","&&(intervals=intervals.substring(2));var dateCheck=new Date(_TOOLS.strToDate(date)),date2=new Date,date1=new Date,resultsInterval=[];return intervals=intervals.split(","),intervals.map(interval=>{if(interval){var dates_interval=interval.split("|");date1.setFullYear(date1.getFullYear()-1e3),dates_interval[0]&&(date1=new Date(_TOOLS.strToDate(dates_interval[0]))),date2.setFullYear(date2.getFullYear()+1e3),dates_interval[1]&&(date2=new Date(_TOOLS.strToDate(dates_interval[1]))),resultsInterval.push(dateCheck>=date1&&dateCheck<=date2)}}),!!resultsInterval.filter(el=>!!el).length},dateToStr:function(date){return date.toLocaleString("fr-FR").split(" ")[0].replace(",","")},strToDate:function(dateString,hourString){var date=dateString.split("/"),repDate=new Date(date[2]+"-"+date[1]+"-"+date[0]);if(hourString){var min="00",hour=hourString;hourString.includes(":")&&([hour,min]=hourString.split(":")),repDate=new Date(date[2]+"-"+date[1]+"-"+date[0]+"T"+hour+":"+min+":00")}return repDate},getNextDay:function(dateString,hourString){var initialDay=_TOOLS.strToDate(dateString,hourString),nextDay=new Date;return nextDay.setDate(initialDay.getDate()+1),nextDay},strFRToStrUS:function(strFR){return strFR.split("/").reverse().join("-")},bindGenericEvents:function(){$(document).on("click.toggleVisibility",".js-toggle-visibility",function(){$($(this).attr("data-target")).toggleClass("hidden")})},replaceAll:function(text,search,replace){return text.replace(new RegExp(search,"g"),replace)},getTypePlural:function(type){const specific=["A partager","Vin rouge","Vin ros\xE9","Vin blanc","Autre article","Eau","Eau min\xE9rale","Softs"],specific_trads=["A partager","Vins rouges","Vins ros\xE9s","Vins blancs","Autres articles","Eaux","Eaux min\xE9rales","Softs"];return specific.indexOf(type)!==-1?specific_trads[specific.indexOf(type)]:type+"s"},isToday:function(someDate){const today=new Date;return someDate.getDate()===today.getDate()&&someDate.getMonth()===today.getMonth()&&someDate.getFullYear()===today.getFullYear()},isTomorrow:function(someDate){const tomorrow=new Date;return tomorrow.setDate(tomorrow.getDate()+1),someDate.getDate()===tomorrow.getDate()&&someDate.getMonth()===tomorrow.getMonth()&&someDate.getFullYear()===tomorrow.getFullYear()},stripHtml:function(html){let tmp=document.createElement("DIV");return tmp.innerHTML=html,tmp.textContent||tmp.innerText||""},getJsonTT:function(url){return $.get(url).then(function(response){return response=response.split("<!-- BEGIN template -->")[1]||response.split("<!-- BEGIN template -->")[0],response=response.split("<!-- END template -->")[0],response})},getDateString(datefr,opts){var options={is_day:!0,is_date:!0,is_month:!0,is_year:!0};opts&&(options=Object.assign(options,opts));var day_index=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],months=["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"],date=datefr.split("/"),day=new Date(date[2]+"-"+date[1]+"-"+date[0]),days_key=day.getDay(),responseDate="";
1return options.is_day===!0&&(responseDate+=day_index[days_key]+" "),options.is_date===!0&&(responseDate+=day.getDate()+" "),options.is_month===!0&&(responseDate+=months[day.getMonth()]+" "),options.is_year===!0&&(responseDate+=day.getFullYear()),responseDate},updateStyleModalForBarUrlMobile:function(){if(!$("html").hasClass("supports-mobile"))return!1;var diffHeight=window.innerHeight-document.documentElement.clientHeight;console.log({diffHeight,wh:window.innerHeight,cw:document.documentElement.clientHeight,cond:window.innerHeight===document.documentElement.clientHeight}),diffHeight===0?($(".ProductModal.product-section").addClass("withBarUrl"),$(".ProductModal__Container .modal__form").addClass("withBarUrl"),$(".modal__footer").addClass("withBarUrl")):($(".ProductModal.product-section").removeClass("withBarUrl"),$(".ProductModal__Container .modal__form").removeClass("withBarUrl"),$(".modal__footer").removeClass("withBarUrl"))},cancelFullScreen:function(){var doc=window.document,cancelFullScreen=doc.exitFullscreen||doc.mozCancelFullScreen||doc.webkitExitFullscreen||doc.msExitFullscreen;cancelFullScreen.call(doc)},toggleFullScreen:function(){var doc=window.document,cancelFullScreen=doc.exitFullscreen||doc.mozCancelFullScreen||doc.webkitExitFullscreen||doc.msExitFullscreen,docEl=doc.documentElement,requestFullScreen=docEl.requestFullscreen||docEl.mozRequestFullScreen||docEl.webkitRequestFullScreen||docEl.msRequestFullscreen,cancelFullScreen=doc.exitFullscreen||doc.mozCancelFullScreen||doc.webkitExitFullscreen||doc.msExitFullscreen;if(!doc.fullscreenElement&&!doc.mozFullScreenElement&&!doc.webkitFullscreenElement&&!doc.msFullscreenElement)requestFullScreen.call(docEl);else{var doc=window.document,cancelFullScreen=doc.exitFullscreen||doc.mozCancelFullScreen||doc.webkitExitFullscreen||doc.msExitFullscreen;cancelFullScreen.call(doc)}}},_TOOLS.bindGenericEvents();
2//# sourceMappingURL=/cdn/shop/t/2/assets/COMMON.tools.js.map?v=65830568379309520071702993165

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.