PageSourceSearch

https://www.speidersport.no/scripts/depid.js

js speidersport.no collected 2026-10-01 16:32:05 UTC 2,048 bytes, 1 lines download raw bytes

1mcWeb.depId=new function(n){"use strict";this.events={onChangedDepId:"mcWeb.depId.onChangedDepId"};this.vm=function(t){var i=this;i.id="#"+t;i.settings=null;i.service=new WebApiService("DepId");i.cartName=null;i.cartGuid=null;i.isCheckout=!1;i.hasCartItemTypes=ko.observable(!1);i.code=ko.observable("");i.lastCode=ko.observable("");i.depIdType=ko.observable(0);i.showSearchBtn=ko.observable(!0);i.showSearchSpin=ko.observable(!1);i.showErrorDepCode=ko.observable(!1);i.showAddCodeSuccess=ko.observable(!1);i.isCodeSelected=ko.observable(!1);i.onBlurCode=ko.observable(!1);i.onBlurCode.subscribe(function(){i.addOrUpdateCode();i.isValid();i.isCodeSelected(!1)});i.load=function(t,r){r!=null&&r&&(i.settings=r,i.isCheckout=n(".body-checkout").length>0?!0:!1)};i.UseDepId=function(){try{var n={cartName:i.cartName,isCheckout:!0};i.service.GetAction("UseDepId",n).then(function(n){if(n.IsActive===!0){i.hasCartItemTypes(!0);i.code(n.Code);i.lastCode(i.code());i.showAddCodeSuccess(i.code().length>0);i.depIdType(n.Type);return}i.hasCartItemTypes(!1);i.showAddCodeSuccess(!1)})}catch(t){Console.log("mcWeb.depId.UseDepId - Ex: "+t);i.hasCartItemTypes(!1)}};i.addOrUpdateCode=function(){i.showErrorDepCode(!1);i.showSearchBtn(!1);i.showSearchSpin(!0);var n={code:i.code(),cartName:i.cartName,isCheckout:!0};i.service.PostAction("AddOrUpdateCode",n).then(function(n){i.showSearchSpin(!1);i.showSearchBtn(!0);n===!0?(i.lastCode(i.code()),i.showAddCodeSuccess(i.code().length>0),i.hasCartItemTypes(!0)):(i.lastCode(""),i.code(""),i.hasCartItemTypes(!1),i.showAddCodeSuccess(!1))})};i.onClickAddCode=function(n,t){return t.keyCode===13||t.type==="click"?(i.addOrUpdateCode(),t.preventDefault(),!1):!0};i.isValid=function(){return i.showErrorDepCode(!1),!0};PubSub.subscribe(mcWeb.cart.events.cartGuid,function(n,t){t!=null&&i.cartName!==t.cartName&&(i.cartName=t.cartName,i.cartGuid=t.cartGuid,i.UseDepId())});PubSub.subscribe(mcWeb.cart.events.onChangedQuantityCart,function(n,t){i.cartName!==null&&t!=null&&t.newQuantity<1&&i.addOrUpdateCode()})}}(jQuery)

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.