PageSourceSearch

https://www.dadway-onlineshop.com/js/usr/goods.js?d=20240129

js dadway-onlineshop.com collected 2026-10-03 19:19:44 UTC 6,782 bytes, 169 lines download raw bytes

1var ecblib = ecblib || {};
2ecblib.customize = ecblib.customize || {};
3ecblib.customize.goods = ecblib.customize.goods || {};
4
5(function () {
6    'use strict';
7
8    var _goods = ecblib.customize.goods;
9
10}());
11
12jQuery(function () {
13  
14  //---リロード時初期化
15  jQuery('body, .bgfilter').removeClass('fixed_popcart').removeClass('fixed_popagree');
16  
17  //---注意事項がある場合のPOPUP Variation
18  jQuery('.block-add-cart--btn-with-agree-variation').click(function(){
19    if(jQuery('.bgfilter').length == 0){
20      jQuery('.wrapper').prepend('<div class="bgfilter" />');
21    }
22    var documentH = jQuery(document).height();
23    jQuery('.bgfilter').css('height', documentH);
24    jQuery('body, .bgfilter').addClass('fixed_popagree');
25
26    jQuery('.bgfilter.fixed_popagree, .agree-for-shopping, .agree-frame-close').click(function(){
27      jQuery('body, .bgfilter').removeClass('fixed_popcart').removeClass('fixed_popagree');
28    });
29    var ThisAgree = jQuery(this).next('.display-none-submit').find('.agree-message').html();
30    jQuery('#form_agree_message .agree-message-body').html(ThisAgree);
31    
32    var ThisItem  = jQuery(this).next('.display-none-submit').find('button').attr('id').replace('variation_cart_button_','');
33    jQuery('.agree-for-cart-variation').click(function(){
34      jQuery('body, .bgfilter').removeClass('fixed_popagree');
35      jQuery('#goods_for_add_cart').val(ThisItem);
36      jQuery('#goods_shopping_form').submit();
37    });
38  });
39  
40  //---注意事項がある場合のPOPUP
41  jQuery('.block-add-cart--btn-with-agree').click(function(){
42    if(jQuery('.bgfilter').length == 0){
43      jQuery('.wrapper').prepend('<div class="bgfilter" />');
44    }
45    var documentH = jQuery(document).height();
46    jQuery('.bgfilter').css('height', documentH);
47    jQuery('body, .bgfilter').addClass('fixed_popagree');
48
49    jQuery('.bgfilter.fixed_popagree, .agree-for-shopping, .agree-frame-close, .agree-frame-return').click(function(){
50      jQuery('body, .bgfilter').removeClass('fixed_popcart').removeClass('fixed_popagree');
51    });
52    jQuery('.agree-for-cart').click(function(){
53      jQuery('body, .bgfilter').removeClass('fixed_popagree');
54      jQuery('#goods_shopping_form').submit();
55    });
56  });
57
58  //---関連商品
59	if(jQuery('#block_of_recommend').length){
60		jQuery('#block_of_recommend ul.block-pickup-list-p--items').each(function(){
61      if(jQuery(this).find('.block-pickup-list-p--item-body').length > 5){
62        jQuery(this).bxSlider({
63          auto: false,
64          speed: 1500,
65          pause: 4000,
66          pager:  true,
67          controls: true,
68          slideWidth: 1200,
69          slideMargin: 0,
70          infiniteLoop: false,
71          hideControlOnEnd: true,
72        });
73      }
74		});
75  }
76  
77  //---アイテム説明/お手入れ方法
78  if(jQuery('.block-goods-tab-comment .tab-comment-contents-box').length > 1){  
79    jQuery('.block-goods-tab-comment .tab-comment-header li').eq(0).addClass('active');
80    jQuery('.block-goods-tab-comment .tab-comment-contents-box').hide();
81    jQuery('.block-goods-tab-comment .tab-comment-contents-box').eq(0).addClass('active').show();
82
83    jQuery(document).on('click', '.block-goods-tab-comment .tab-comment-header li', function(){
84      var index = jQuery(this).parents('ul').find('li').index(this);
85      jQuery(this).parents('.tab-comment-header').find('li').removeClass('active');
86      jQuery(this).addClass('active');
87      jQuery('.block-goods-tab-comment .tab-comment-contents-box').removeClass('active').hide();
88      jQuery('.block-goods-tab-comment .tab-comment-contents-box').eq(index).addClass('active').fadeIn();
89			
90			if(jQuery(this).hasClass('comment2-tab')){
91				jQuery('div.block-goods-comment4').show();
92				jQuery('div.block-goods-comment-spare').show();
93			} else {
94				jQuery('div.block-goods-comment4').hide();
95				jQuery('div.block-goods-comment-spare').hide();
96			}
97			
98    });
99  } else {
100    jQuery('.block-goods-tab-comment .tab-comment-header li').addClass('active').css({'cursor':'initial'});
101  }
102  
103  //--- 関連商品
104  if(jQuery('.block-accessory-list').length>0){
105  	jQuery('.block-accessory-list dl').unwrap();
106  	jQuery('.block-accessory-list dl').wrap('<li></li>');
107  	jQuery('.block-accessory-list').insertAfter('.block-goods-detail--color-variation-goods-thumbnail-form');
108  }
109});
110
111jQuery(window).on('load',function() {
112  //---SALE時の割引率表示
113  if(jQuery('.block-goods-price .default-price').length && jQuery('.block-goods-price .block-goods-price--price').length){
114    var default_p = jQuery('.block-goods-price').find('.default-price').text().replace(/[^0-9]/g, '');
115    var sale_p    = jQuery('.block-goods-price').find('.block-goods-price--price').text().replace(/[^0-9]/g, '');
116    if(default_p != 0 && sale_p != 0){
117      // 計算処理中でparseIntを追加
118      var SalePer = (100 - parseInt((sale_p / default_p) * 100));
119      // var OffPer  = Math.round(SalePer); IE非対応
120      var OffPer    =  parseInt(SalePer, 10);
121      if(OffPer != 0){
122        if(jQuery('.block-goods-price').hasClass('onsale')){
123          jQuery('.block-goods-price .block-goods-price-inner-box').append('<div class="sale-per-icon">' + OffPer + '%OFF</div>');
124        } else {
125          jQuery('.block-goods-price .block-goods-price-inner-box').append('<div class="sale-per-icon stage">' + OffPer + '%OFF</div>');
126        }
127      }
128    }
129  }
130
131});
132
133// Recommend
134window.LightningRecommendEventV2 = window.LightningRecommendEventV2 || [];
135window.LightningRecommendEventV2.push({
136    ready: function(){
137    },
138    create: function(evt){
139    },
140    mount: function(evt){
141        if(this.nodeType == Node.ELEMENT_NODE){
142            if(evt.tagsCode == 'goods_main_pc'){
143                if(window.recommendgoodslist){
144                    while (window.recommendgoodslist.length > 0) {
145                        var goods = window.recommendgoodslist.shift();
146                        evt.goodsList.push(goods);
147                    }
148                }
149                else{
150                    window.recommendgoodslist = evt.goodsList;
151                }
152            }
153            else if(evt.tagsCode == 'goods_pc_pv_exclude'){
154                if(window.recommendgoodslist){
155                    while (evt.goodsList.length > 0) {
156                        var goods = evt.goodsList.shift();
157                        window.recommendgoodslist.push(goods);
158                    }
159                }
160                else{
161                    window.recommendgoodslist = evt.goodsList;
162                }
163                
164            }
165        }
166    },
167    load: function(){
168    }
169});

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.