PageSourceSearch

https://cdn.lovense.com/resources/assets/js/rabbitCompareCard.js?v=291016962

js lovense.com collected 2026-10-01 10:37:21 UTC 7,187 bytes, 1 lines download raw bytes

1(function(){"use strict";if(!document.contains){Element.prototype.contains=function(t){if(arguments.length<1){throw new TypeError("1 argument is required")}if(typeof e!=="object"){throw new TypeError("Argument 1 (other) to Node.contains must be an instance of Node")}var e=t;do{if(this===e){return true}if(e){e=e.parentNode}}while(e);return false}}function t(t,e){var o=Number(t)/Number(e).toFixed(2)*100;$(".now_progress").width(o+"%")}function e(e,o,a){try{if(window._tfa){_tfa.push({notify:"event",name:"add_to_cart",id:1695185})}}catch(t){console.log(t)}var r={pid:e.id,type:e.type,n:e.n,couponId:e.cpid,couponType:e.couponType,bnid:e.bnid,oldPid:e.oldPid};if(!!e.couponShow){r.couponShow="1"}if(!!e.fromDbAddress){r.fromDbAddress="1"}$.ajax({url:"/cart/data",type:"GET",timeout:e.timeout,data:r,success(r){if(r.result){if(r.code==405){new _Lovense.Toast.error($("._canNotBuy").text(),{y:"middle"});return}try{try{if(r.data.adsPixelList.includes("brainx")){bxtag("event","add_to_cart",JSON.parse(r.data.brainxBody))}if(r.data.adsPixelList.includes("ym")){mkq("track","AddToCart",JSON.parse(r.data.adsBody["ym"]))}if(r.data.adsPixelList.includes("DV360")){gtag("event","conversion",{allow_custom_scripts:true,u1:window.location.href,send_to:"DC-15565302/invmedia/buyno0+unique"})}if(r.data.adsPixelList.includes("drakblue")){mctag("event","add_to_cart",JSON.parse(r.data.adsBody["drakblue"]))}}catch(t){console.log(t)}if(r.data.adsPixelList.includes("twAds")&&e.type!="3"){twq("event","tw-pkjaw-pkjb0",{value:r.data.totalCost,currency:r.data.currency})}}catch(t){console.log(t)}try{var d=$("#_blackFridayTophyCoupon").val()+"";if(!!d){if(!!r.data.couponPopupDTO){t(r.data.couponPopupDTO.couponInfo.couponProcessDTO.cartCouponAmountCal,r.data.couponPopupDTO.couponInfo.couponProcessDTO.mininumSpendCal)}}}catch(t){console.log(t)}if(o){o(r.data)}}else if(a){a(r.message||r.msg||"",false)}},error(t,e){if(a){var o=t.responseJSON||{};a(o.message||o.msg||"",e==="timeout")}}})}function o(t,e,o,a,r){if(r===void 0){r=false}try{var d=$(".n-ab-text").text();var c=$(".n-ab-configId").text();var i=$(".sever_time").text();if(d==0||c==""){d=0;c=""}var p=[{abValue:parseInt(d),clickPos:t,clickPos2:e,validClickInd:a,clickName:o,path:window.location.pathname,abConfigId:c,createTimeLong:parseInt(i)}];if(!r){$.ajax({url:"/coll/click/batch",type:"post",contentType:"application/json;charset=UTF-8",dataType:"json",data:$.toJSON(p)})}else{if(navigator.sendBeacon){var n=new Blob([JSON.stringify(p)],{type:"application/json; charset=UTF-8"});navigator.sendBeacon("/coll/click/batch",n)}}}catch(t){throw new Error(t)}}$(function(){$(document).on("click","._OpenProductCompareWrap",function(){$("._productCompareWrap").show();$("body").css("overflow","hidden")});$(document).on("click","._productCompareWrap ._close",function(){$("._productCompareWrap").hide();$("body").css("overflow","auto");o("rabbit_compare","","close")});$(document).on("click","._productCompareSelectBox",function(){$(this).find("._productCompareSelectCon").toggle();$(this).toggleClass("active");if($(this).hasClass("_productCompareSelectBox1")){$("._productCompareSelectBox2 ._productCompareSelectCon").hide();$("._productCompareSelectBox2").removeClass("active");var t=$("._productCompareSelectBox2").attr("data-code");$("._productCompareSelectBox1 ._productCompareSelectCon .select_item").removeClass("disable");$.each($("._productCompareSelectBox1 ._productCompareSelectCon .select_item"),function(e,o){if($(o).attr("data-code")==t){$(o).addClass("disable")}})}if($(this).hasClass("_productCompareSelectBox2")){$("._productCompareSelectBox1 ._productCompareSelectCon").hide();$("._productCompareSelectBox1").removeClass("active");var e=$("._productCompareSelectBox1").attr("data-code");$("._productCompareSelectBox2 ._productCompareSelectCon .select_item").removeClass("disable");$.each($("._productCompareSelectBox2 ._productCompareSelectCon .select_item"),function(t,o){if($(o).attr("data-code")==e){$(o).addClass("disable")}})}});$(document).on("click","._productCompareSelectBox ._productCompareSelectCon",function(t){t.stopPropagation()});
1$(document).on("click","._productCompareSelectBox ._productCompareSelectCon .select_item",function(){if(!$(this).hasClass("disable")){$(this).parents("._productCompareSelectCon").find(".select_item").removeClass("active");$(this).addClass("active");$(this).parents("._productCompareSelectBox").find("._productCompareProductName").text($(this).find(".name").text());$(this).parents("._productCompareSelectBox").attr("data-code",$(this).attr("data-code"));$(this).parents("._productCompareSelectCon").hide();$(this).parents("._productCompareSelectBox").removeClass("active");var t=Number($(this).index()+1);if($(this).parents("._productCompareSelectBox").hasClass("_productCompareSelectBox1")){$.each($("._productCompareListMb"),function(e,o){if(t==1){$(o).find('.productCompare_item[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="1"]').html());$(o).find('.productCompare_body[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="1"]').html())}if(t==2){$(o).find('.productCompare_item[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="2"]').html());$(o).find('.productCompare_body[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="2"]').html())}if(t==3){$(o).find('.productCompare_item[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="3"]').html());$(o).find('.productCompare_body[data-index="1"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="3"]').html())}})}if($(this).parents("._productCompareSelectBox").hasClass("_productCompareSelectBox2")){$.each($("._productCompareListMb"),function(e,o){if(t==1){$(o).find('.productCompare_item[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="1"]').html());$(o).find('.productCompare_body[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="1"]').html())}if(t==2){$(o).find('.productCompare_item[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="2"]').html());$(o).find('.productCompare_body[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="2"]').html())}if(t==3){$(o).find('.productCompare_item[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_item[data-index="3"]').html());$(o).find('.productCompare_body[data-index="2"]').html($("._productCompareList"+(e+1)+' .productCompare_body[data-index="3"]').html())}})}}});$(document).on("click","._productCompareItemAdd",function(){var t=$(this).attr("data-code");var a={id:t,type:1};e(a,function(e){if(!e.itemList||!e.itemList.length)return;window.location.href="/my-shopping-cart";o("rabbit_compare","product_"+t,"compare_buy")})});var t=document.querySelector("._productCompareWrap .productCompare_scroll");t.addEventListener("scroll",function(){var e=t.scrollTop;if(e>100){$("._productCompareHeadTop").addClass("active")}else{$("._productCompareHeadTop").removeClass("active")}})})})();

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.