PageSourceSearch

https://www.ikea.co.id/webroot/js/Main.min.js?v=1788329693

js ikea.co.id collected 2026-09-24 09:30:05 UTC 8,502 bytes, 1 lines download raw bytes

1let MAX_TABLET_WIDTH=834;var Main={isReal:!0,main:function(){$('[data-action="changeShop"]').click(Main.changeShop),$('[data-action="changeLocale"]').click(Main.changeLocale),$("#business_homePage").click(Main.homePage),$("#business_myAccount").click(Main.myAccount),Main.observeBodyScroll()},observeBodyScroll(){new MutationObserver(e=>{e.forEach(e=>{var t;"class"==e.attributeName&&((e=$(e.target).prop(e.attributeName)).includes("no-scroll")||e.includes("modal-open")||e.includes("noScroll")?$("body").css("padding-right",((e=document.createElement("div")).style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e),t=document.createElement("div"),e.appendChild(t),t=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),t)).css("overflow","hidden"):$("body").css("padding-right","").css("overflow",""))})}).observe($("body")[0],{attributes:!0,attributeFilter:["class"],characterData:!1,childList:!1})},changeShop:function(e){e.preventDefault();e={value:$(this).data("name"),key:"shop",url:decodeURIComponent(document.location.pathname),search:document.location.search};Main.change(e)},changeLocale:function(e){e.preventDefault();e={value:$(this).data("locale"),key:"locale",url:decodeURIComponent(document.location.pathname),search:document.location.search};Main.change(e)},change:function(e){$.ajax({async:!0,type:"GET",data:e,dataType:"html",url:validateURL.URL()+"/index/change",success:function(e){document.location.replace(e)}})},reorderSelect(e){void 0===e&&(e=null);let t=$('select[data-type="select"][data-top]'),n=t.data("top").split(","),a=0<t.attr("data-placeholder").length?'<option value="0" disabled selected hidden>'+t.attr("data-placeholder")+"</option>":null,i;t.each(function(e,t){for(let e=0;e<n.length;e++){var a=$(this).find('option[value="'+parseInt(n[e].trim())+'"]');0==e?$(a).insertAfter($($(this).find("option[data-toplist]"))):$(a).insertBefore($($(this).find("option[disabled]:not([data-toplist])")))}}),i=t.find("option:first-of-type"),a&&$(a).insertBefore($(i))},isMobile:function(){return(-1!=window.navigator.userAgent.indexOf("iPhone")||-1!=window.navigator.userAgent.indexOf("iPad")||-1!=window.navigator.userAgent.indexOf("Android"))&&window.innerWidth<=MAX_TABLET_WIDTH},gaModalAddToCart:function(n,i,o,r=null){try{let e=null;i?n?.gtm&&(n.gtm.quantity=o,(e=n.gtm).event_action="Add to Cart"):e={name:n.name+" - "+n.facts,id:n.id,price:parseInt(n.price).toString(),brand:n.name,category:n.full_category,variant:n.type,quantity:o},GA_datalayer.measureAddToCart(e);var s,l=ga_ecommerce_events.getProductImpression(n);l.quantity=o;let t="",a=null;0<$("#card_"+l.item_id).parents(".newIdeasBlock").length&&null!=$("#card_"+l.item_id).parents(".newIdeasBlock").attr("id")?(t="TRAFFIC",a=l.item_id):0<$("#contentWrapper .template_detail .productList").length&&0<$(r).parents(".productList").length?(l.item_list_name=(0<$(r).parents(".productsCombine").length?$(".productsCombine"):$(".product-slider-wrap")).find("h2").text().trim(),l.item_list_id=null):0<$(".add-on-sale-carousel-component .carousel-component h3").length?(l.item_list_name=$(".add-on-sale-carousel-component .carousel-component h3").text().trim(),l.item_list_id=null):3==$(".breadcrumb li:not(.breadcrumb-item-mobile)").length&&(l.item_list_id=l.item_category3,l.item_list_name=$("#contentWrapper .container.customPages h1").text().trim()),0<t.length&&(s=ga_ecommerce_events.getListNameId(t,a),l.item_list_name=(s.hasOwnProperty("item_list_name"),s.item_list_name),l.item_list_id=(s.hasOwnProperty("item_list_id"),s.item_list_id)),ga_ecommerce_events.add_to_cart({ecommerce:{value:ga_ecommerce_events.getValue([l]),currency:"Rp",add_to_cart_type:"add_to_cart",items:[l]}})}catch(e){}},sendEventToFlutter:function(e=!1,t,a=null){var n=window.navigator.userAgent.toLowerCase(),i=/iphone|ipod|ipad/.test(n);e&&(i||n.includes("wv"))&&window.flutter_inappwebview.callHandler(t,a)},homePage:function(e){e.preventDefault(),window.location.href="/"+window.location.pathname.substring(1,3)},myAccount:function(e){e.preventDefault(),window.location.href="/ecoclient/account"},getIsReal(){return this.isReal},setIsReal(e){this.isReal=e},showNotify(e){var t={toastClass:"add-item-notification",progressBar:!1,closeButton:!0};!0===list.isMobile&&(t.positionClass="toast-bottom-full-width"),toastr.success(e,null,t)}};function ordinal_suffix_of(e){var t=e%10,a=e%100;return 1==t&&11!=a?e+"st":2==t&&12!=a?e+"nd":3==t&&13!=a?e+"rd":e+"th"}function formatDateDelivery(e){var t=JSON.parse(Messages.getText("array_months")),a=JSON.parse(Messages.getText("array_week")),e=new Date(e),a=a[e.getDay()],n=e.getDate(),t=t[e.getMonth()];return a+", "+(n="en"==getLocale()?ordinal_suffix_of(n):n)+" "+t}function formatDateTimeslot(e){var t=JSON.parse(Messages.getText("array_months")),a=JSON.parse(Messages.getText("array_week")),e=new Date(e),a=a[e.getDay()],n=e.getDate(),i=e.getFullYear();return a+" "+t[e.getMonth()]+" "+(n="en"==getLocale()?ordinal_suffix_of(n):n)+", "+i}function disabledQuantity(e,t,a,n=1,i=""){var o;e&&(t=Number(t),a=Number(a),n=Number(n),(isNaN(a)||a<n)&&(a=n),e=(i=$((i?"."+i:"")+'.itemCounter[data-id="'+e+'"]')).find("span.action"),o=i.find('span[data-action="sum"]'),i=i.find('span[data-action="minus"]'),e.removeClass("disabled bl br"),!t||t<=0?(o.addClass("disabled bl"),i.addClass("disabled br")):(t<=a&&o.addClass("disabled bl"),a<=n&&i.addClass("disabled br")))}function formatPrice(e){for(var e=(e+="").split("."),t=e[0],e=1<e.length?"."+e[1]:"",a=/(\d+)(\d{3})/;a.test(t);)t=t.replace(a,"$1.$2");return t+e}function getPrice(e){return parseInt(e.substring(3,e.length).toString().replace(/\./g,""))}function validateEmail(e){return/^(([^<>()[\]\\.,+;:\s@\"]+(\.[^<>()[\]\\.,+;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function validatePhone(e){let t=!1;return!1===Main.getIsReal()&&/^6[0-9]\d{7}
1$/.test(e)&&(t=!0),t=/^8[0-9]\d{7,12}$/.test(e)?!0:t}function prefixPhone(e){let t="id";return t=!1===Main.getIsReal()&&/^6[0-9]\d{7}$/.test(e)?"es":t}function getLocale(){return window.location.pathname.split("/")[1]}function isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}function isScrolledIntoView(e){var t=$(window).scrollTop(),a=t+$(window).height(),n=$(e).offset().top;return n+$(e).height()<=a&&t<=n}function nl2br(e,t){return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(t||void 0===t?"<br />":"<br>")+"$2")}function copy(e){var t=document.createElement("input");t.setAttribute("value",e.trim()),document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function objectReplaceQuotes(e){try{e=e.replaceAll("'",'"');var t=/([A-Za-z0-9]|\s)(")([A-Za-z0-9]|\s)/g;return e=JSON.parse(e.replaceAll(t,"$1'$3"))}catch(e){return!1}}function updateHeaderBarMarginTop(){var e=$("#openWebViewAppModal").find(".modal-dialog"),t=$(".bodyHeaderBar.top"),a=$("body"),n=$("#sidebar-main-menu"),i=0<t.length&&0<t[0].offsetHeight,o=e.length&&0<e[0].offsetHeight;let r=0;o?(a.css("margin-top",e[0].offsetHeight),i&&t.css("margin-top",e[0].offsetHeight)):(a.css("margin-top","0px"),t.css("margin-top","0px")),n.hasClass("active")&&(o&&(r+=e[0].offsetHeight),i&&t.each(function(){r+=$(this)[0].offsetHeight}),n.css({"padding-bottom":r})),null!==document.getElementById("sidebar-main-menu")&&document.getElementById("sidebar-main-menu").addEventListener("before-refresh-sidebar",()=>{let e=setInterval(function(){$("#sidebar-main-menu").hasClass("active")&&(updateHeaderBarMarginTop(),clearInterval(e))},100)})}function getCookie(e){let t=e+"=";e=decodeURIComponent(document.cookie).split("; ");let a;return e.forEach(e=>{0===e.indexOf(t)&&(a=e.substring(t.length))}),a}$(document).ready(function(){Main.main(),0<$('select[data-type="select"][data-top]').length&&Main.reorderSelect(),updateHeaderBarMarginTop(),toastr.options={closeButton:!1,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-top-right toast-bottom-small",toastClass:null,preventDuplicates:!1,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"}}),null!==document.getElementById("sidebar-main-menu")&&document.getElementById("sidebar-main-menu").addEventListener("before-refresh-sidebar",()=>{let e=setInterval(function(){$("#sidebar-main-menu").hasClass("active")&&(updateHeaderBarMarginTop(),clearInterval(e))},100)});

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.