PageSourceSearch

https://www.calmingheat.com/cdn/shop/t/69/assets/simplistic.js?v=90288107845220095151696871734

js calmingheat.com collected 2026-09-29 10:01:47 UTC 9,054 bytes, 2 lines download raw bytes

1function handleFirstTab(e){e.keyCode===9&&document.body.classList.add("user-is-tabbing")}window.addEventListener("keydown",handleFirstTab),document.addEventListener("click",function(){document.body.classList.remove("user-is-tabbing")}),$(function(){var oSlideToggle=jQuery.fn.slideToggle;jQuery.fn.slideToggle=function(){return Simplistic.reducedMotion()?jQuery.fn.toggle.apply(this,arguments):oSlideToggle.apply(this,arguments)};var oSlideDown=jQuery.fn.slideDown;jQuery.fn.slideDown=function(){return Simplistic.reducedMotion()?jQuery.fn.show.apply(this,arguments):oSlideDown.apply(this,arguments)};var oSlideUp=jQuery.fn.slideUp;jQuery.fn.slideUp=function(){return Simplistic.reducedMotion()?jQuery.fn.hide.apply(this,arguments):oSlideUp.apply(this,arguments)},jQuery.fn.sortDomElements=(function(){return function(comparator){return Array.prototype.sort.call(this,comparator).each(function(i){this.parentNode.appendChild(this)})}})(),isMobile.any||$("body").addClass("isNotMobile"),$(document).on("click",".quantity-box .minus",function(e){e.preventDefault();var input=$(this).parent().find("input[type=number]");try{input.attr("min")<input.val()&&(input.get(0).stepDown(),input.change())}catch(e2){var value=parseInt(input.val())-1;input.val(value>=0?value:0),input.change()}}),$(document).on("click",".quantity-box .plus",function(e){e.preventDefault();var input=$(this).parent().find("input[type=number]");try{input.get(0).stepUp(),input.change()}catch(e2){var value=parseInt(input.val())+1;input.val(value),input.change()}}),$(document).on("click",".product-item .quick-view-btn",function(){var url=$(this).data("url");return $("#loading-overlay").show(),$.ajax({url:url,cache:!1}).success(function(data){$("#loading-overlay").hide(),Simplistic.openModal(data,"quick-view")}),!1}),$(document).on("click",".quick-add-to-cart-form .quick-add-btn",function(){var form=$(this).closest("form");return form.length>0&&(form.submit(),$("#side-cart").length>0&&setTimeout(function(){updateCartDesc(!0,!0)},500)),!1}),$("#side-cart").length>0&&initSideCart(),$("body").delegate(".add-to-cart-form","submit",function(){return validateAddCart($(this))&&addToCart($(this)),!1}),$(window).scroll($.throttle(15,function(){$(this).scrollTop()<=200?$(".scrollup").removeClass("fadein"):$(".scrollup").addClass("fadein"),$(this).scrollTop()>=80?$(".header-drop").addClass("scroll"):$(".header-drop").removeClass("scroll"),$(this).scrollTop()>=80?$("body").addClass("scroll"):$("body").removeClass("scroll")})),$(".header-drop .nav-wrapper").append($("#header .main-menu").clone()),$(".header-drop .utility-bar-drop").attr("style",$("#header .utility-bar").attr("style")),$(".header-drop .main-menu a").attr({focusable:"false",tabindex:"-1","aria-hidden":"true"}),setupDropdownMenus()});function setupDropdownMenus(){var config={over:function(){$(this).find(".submenu:first").slideDown()},timeout:50,out:function(){$(this).find(".submenu:first").slideUp()}};$(".main-menu .has-dropdown").hoverIntent(config),$(document).on("keydown",".main-menu .has-dropdown a:focus",function(e){e.which==32&&(e.preventDefault(),$(this).next().slideToggle()),e.which==40&&(e.preventDefault(),$(this).next().slideDown()),e.which==38&&(e.preventDefault(),$(this).next().slideUp())}),$(document).on("keydown",".main-menu .has-dropdown .has-dropdown a:focus",function(e){e.which==39&&(e.preventDefault(),$(this).next().slideDown()),e.which==37&&(e.preventDefault(),$(this).next().slideUp())})}function validateAddCart(form){if(form.find("input[name=id]").val()==""){var allOptionsSelected;if(form.find(".single-option-selector").length>0?(allOptionsSelected=!0,form.find(".single-option-selector").each(function(){if($(this).val()=="")return allOptionsSelected=!1,!1})):allOptionsSelected=!1,allOptionsSelected){var errorMsg=form.find(".validation-msg").text();alert(errorMsg||"The selected variant is sold out.")}else{var labels=[];form.find(".options label").each(function(key,obj){labels.push($(obj).text().replace(":","").trim())}),alert("You must select a "+labels.join("/")+".")}return!1}return!0}function initSideCart(){$(document).click(function(event){event.target.id==="page"&&hideSideCart()})}function addToCart(form,callback){$("#loading-overlay").show();var productJs=form.closest(".initialized").data("productjs");productJs?$(document).trigger("addToCart",[productJs.getProduct(),productJs.getCurrentVariant(),form]):$(document).trigger("addToCart",[form]),$.ajax({type:"POST",url:"/cart/add.js",data:form.serialize(),dataType:"json",error:ad
1dToCartFail,success:function(){productJs?$(document).trigger("addToCartSuccess",[productJs.getProduct(),productJs.getCurrentVariant(),form]):$(document).trigger("addToCartSuccess",[form]),callback?callback():addToCartSuccess()},cache:!1})}function addToCartSuccess(jqXHR,textStatus,errorThrown){updateCartDesc(!0)}function addToCartFail(jqXHR,textStatus,errorThrown){var response=$.parseJSON(jqXHR.responseText);$("#loading-overlay").hide(),Simplistic.openModal('<div class="error-itemincart">'+response.description+"</div>","message")}function updateCartDesc(openSideCart,keepModal){$.ajax({type:"GET",url:"/cart?view=side-cart",cache:!1,success:function(data){$("#loading-overlay").hide();var animate=!0;$("#side-cart").width()>0&&$("#side-cart").hasClass("open")&&(animate=!1),$("#side-cart").remove(),$("#page").append(data),!keepModal&&modal&&modal.close(),openSideCart&&(showSideCart(animate),$(".popup-upsell").length>0&&(Simplistic.openModal($(".popup-upsell"),"tingle-modal-popup-upsell"),console.log("Simplistic.openModal")))}})}function showSideCart(animate){$("body, html").css({overflow:"hidden"}),$("#page").addClass("mode-overlay"),animate?setTimeout(function(){$("#side-cart").addClass("open")},100):($("#side-cart").removeClass("ease-animation-slow"),$("#side-cart").addClass("open"),setTimeout(function(){$("#side-cart").addClass("ease-animation-slow")},200)),$(".popup-upsell").length<1&&Simplistic.trapFocus({$container:$("#side-cart"),namespace:"side-cart"})}function hideSideCart(){$("#side-cart").removeClass("open"),$("#page").removeClass("mode-overlay"),$("body, html").css({overflow:""}),$(".popup-upsell").length<1&&Simplistic.removeTrapFocus({$container:$("#side-cart"),namespace:"side-cart"})}window.SimplisticJS=function(){this.formatMoney="${{amount}}",this.beforeTrapFocus=!1,this.trapFocus=function(options){this.beforeTrapFocus=$(":focus");var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$elementToFocus||(options.$elementToFocus=options.$container),options.$container.attr("tabindex","-1"),options.$elementToFocus.focus(),$(document).on(eventName,function(evt){options.$container[0]!==evt.target&&!options.$container.has(evt.target).length&&options.$container.focus()})},this.removeTrapFocus=function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),this.beforeTrapFocus&&(this.beforeTrapFocus.focus(),this.beforeTrapFocus=!1),$(document).off(eventName)},this.handleize=function(str){return str.toLowerCase().replace(/[^\w\u00C0-\u024f]+/g,"-").replace(/^-+|-+$/g,"")},this.reducedMotion=function(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches},this.getQueryParam=function(name,url){url||(url=window.location.href),name=name.replace(/[\[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)"),results=regex.exec(url);return results?results[2]?decodeURIComponent(results[2].replace(/\+/g," ")):"":null},this.randomstring=function(L){for(var s="",randomchar=function(){var n=Math.floor(Math.random()*62);return n<10?n:n<36?String.fromCharCode(n+55):String.fromCharCode(n+61)};s.length<L;)s+=randomchar();return s},this.validateEmail=function(email){var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return re.test(email)},this.openModal=function(content,css,autoClose){modal=new tingle.modal({closeMethods:["overlay","button","escape"],closeLabel:"Close",cssClass:[css],beforeOpen:function(){window.innerWidth>600&&$(".tingle-modal__close").appendTo(".tingle-modal-box__content"),$(".tingle-modal__closeIcon").html('<svg aria-hidden="true" tabindex="-1" role="presentation" class="icon icon-close" viewBox="0 0 32 32"><path fill="#fff" d="M21.7,15.4L32,25.1l-5.4,5.7L16,20.8l-10.6,10L0,25.1l10.3-9.7L0,5.7L5.4,0L16,10L26.6,0L32,5.7L21.7,15.4z"/></svg>')},beforeClose:function(){return $(".tingle-modal__close").prependTo(".tingle-modal"),!0}}),modal.setContent(content),modal.open(),autoClose&&setTimeout(function(){modal&&modal.close()},5e3)},this.onImagesLoaded=function(images,callback){var imagesLoaded=0,loadFunction=function(){imagesLoaded++,imagesLoaded==images.length&&callback()};images.length>0?images.each(function(){var img=new Image;img.onload=loadFunction,img.onerror=loadFunction,img.src=$(this).attr("src")}):callback()}},window.Simplistic=new SimplisticJS;
2//# sourceMappingURL=/cdn/shop/t/69/assets/simplistic.js.map?v=90288107845220095151696871734

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.