PageSourceSearch

https://www.ikea.com.tw/webroot/js/eco/EcoLoginUser.min.js?v=1790842085

js ikea.com.tw collected 2026-10-02 04:59:00 UTC 5,160 bytes, 1 lines download raw bytes

1var EcoLoginUser={isReal:!0,main:function(){let o=document.getElementById("btnSubmitLogin"),i=document.getElementById("login_guestCheckout"),a=document.getElementById("ID_BTN_login_exist");var e=document.getElementById("rememberMe");["touchstart","click"].forEach(e=>{var t="touchstart"===e&&{passive:!1};o&&o.addEventListener(e,e=>{e.preventDefault(),EcoLoginUser.login()},t),i&&i.addEventListener(e,e=>{EcoLoginUser.guestCheckout()},t),a&&a.addEventListener(e,e=>{e.preventDefault(),EcoLoginUser.login()},t)}),e&&e.addEventListener("change",EcoLoginUser.remember)},login:async function(){var e=$("#contentWrapper"),t=(e.busyLoad("show",{animation:"fade"}),"undefined"!=typeof Commons?await Commons.CartService.getShoppingListFromIndexedDB():[]);let c={email:$("#loginForm_email").val(),password:$("#loginForm_password").val(),csrf_token:$("#formlogin2").val(),action:$("#loginForm_action").val(),member:$("input[name=member]:checked").val(),remember:$("#rememberMe").closest(".icheckbox_minimal-blue").hasClass("checked")?1:0,products:$("#products").val(),guestProducts:t};$.ajax({type:"POST",data:c,dataType:"json",url:validateURL.URL()+"/ecologin/login",success:async function(e){if(0==e.success){if($(".message").remove(),"string"==typeof e.toastError&&0<e.toastError.trim().length?EcoLoginUser.showNotification("login-error",e.toastError.trim()):ValidateClient.showInputFieldErrors(e.userInputError,e.passwordInputError),ValidateClient.refreshVerifyPhoneModal(e.viewError1066),"undefined"!=typeof Commons)try{Commons.ecommerceEventService.loginError.dispatch(e.loginEventData)}catch(e){}}else if(localStorage.setItem("member_type",e.memberType),"undefined"!=typeof Commons){var t=Commons.ecommerceEventService;try{t.login.dispatch(e.loginEventData)}catch(e){}if(e?.items&&c.action){var o=Commons.CartService;switch(c.action){case"add_to_favorite":if("function"==typeof o.addWishListProduct)for(var i in e.items){let t=e.items[i];i={productId:parseInt(t.id)};await o.addWishListProduct(i).then(e=>{favorites.showNotify(Messages.getText("added_favorite"),t.name),favorites.dispatchAddToFavoriteEvents(parseInt(t.id),1,1,parseInt(t.current_price),t.tracking,"",e)}).catch(e=>{})}break;case"remove_from_favorite":if("function"==typeof o.removeWishListProduct)for(var a in e.items){let t=e.items[a];a={productId:parseInt(t.id)};await o.removeWishListProduct(a).then(e=>{favorites.showNotify(Messages.getText("item_removed"),t.name),favorites.dispatchRemoveFromFavoriteEvents(parseInt(t.id),1,1,parseInt(t.current_price),t.tracking,"",e)}).catch(e=>{})}break;case"add_to_cart":if("function"==typeof o.addToCartLoggedUser)for(var r in e.items){let t=e.items[r];var r=[{productId:parseInt(t.id),quantity:1,price:parseInt(t.current_price)}],s=function(e){BasicCart.showNotification("positive",t.name),BasicCart.dispatchAddToCartEvents(parseInt(t.id),1,1,parseInt(t.current_price),"added_new_to_cart",t.tracking,"")};await BasicCart.addToCartLoggedUser(r,s)}break;case"remove_from_cart":if("function"==typeof o.removeFromCartLoggedUser)for(var n in e.items){let t=e.items[n];n={productId:parseInt(t.id)},s=function(e){BasicCart.showNotification("caution"),BasicCart.dispatchRemoveFromCartEvents(parseInt(t.id),quantity,1,parseInt(t.current_price),"deleted_from_cart",t.tracking,"")};await BasicCart.removeFromCartLoggedUser(n,s)}}}Commons.cookieService.setCookie("bb_login_checkout",e.wereProductsUpdated,365),0<e.customerProducts.length&&"undefined"!=typeof Commons&&"function"==typeof Commons.CartService.addToCartGuestUser&&await Commons.CartService.addToCartGuestUser(e.customerProducts),document.location.href=e.url}},error:function(){var e=Messages.getText("login_error");toastr.error(e)},complete:function(){e.busyLoad("hide",{animation:"fade"})},timeout:1e5})},guestCheckout:function(){if("undefined"!=typeof Commons)try{Commons.ecommerceEventService.checkoutGuestLogin.dispatch()}catch(e){}window.location.href=validateURL.URL()+"/checkout/guest"},remember:function(e){var t=$("#rememberMe").val();1==t?$("#rememberMe").val(0):0==t&&$("#rememberMe").val(1)},showNotification:function(e,t,o){$(".inline-message-toast__title").text(t),$('[id$="-notification"]').removeClass("inline-message-toast--show"),$('[id$="-notification"]').addClass("inline-message-toast--off-screen"),$('[id$="-notification"]').attr("aria-hidden",!0),$('[id$="-notification"]').css("right",0);var i=$('[id$="'+e+'-notification"]');i.removeClass("inline-message-toast--off-screen"),i.addClass("inline-message-toast--show"),i.attr("aria-hidden",!1),setTimeout(function(){i.hasClass("inline-message-toast--show")&&(i.removeClass("inline-message-toast--show"),i.addClass("inline-message-toast--off-screen"),i.attr("aria-hidden",!0))},4e3)},hideNotification:function(e){e=$("#"+e+"-notification");e.hasClass("inline-message-toast--show")&&(e.removeClass("inline-message-toast--show"),e.addClass("inline-message-toast--off-screen"),e.attr("aria-hidden",!0)),$('[id$="-notification"]').removeClass("inline-message-toast--show"),$('[id$="-notification"]').addClass("inline-message-toast--off-screen"),$('[id$="-notification"]').attr("aria-hidden",!0)}};$(document).ready(EcoLoginUser.main);

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.