PageSourceSearch

https://www.dadway-onlineshop.com/js/usr/user.js?d=20260415

js dadway-onlineshop.com collected 2026-10-03 19:19:34 UTC 10,575 bytes, 262 lines download raw bytes

1var ecblib = ecblib || {};
2ecblib.customize = ecblib.customize || {};
3ecblib.customize.user = ecblib.customize.user || {};
4
5jQuery(function () {
6	var _user = ecblib.customize.user;
7
8	//-- トップページへ戻る初期値
9	jQuery('#footer_pagetop').hide();
10
11	//--- スムーススクロール
12	jQuery('#footer_pagetop a').click(function () {
13		var a_speed = 500;
14		var a_headerH = 0;
15		if (jQuery('#header_pickup_banner').length) {
16			a_headerH = jQuery('#header').height() + jQuery('#header_pickup_banner').height() + 30;
17		} else {
18			a_headerH = jQuery('#header').height();
19		}
20		var a_href = jQuery(this).attr("href");
21		var a_target = jQuery(a_href == "#" || a_href == "" ? 'html' : a_href);
22		var a_position = a_target.offset().top - a_headerH;
23		jQuery('body,html').animate({ scrollTop: a_position }, a_speed, 'swing');
24		return false;
25	});
26  
27	//--- サジェスト表示時
28  jQuery('#hnav_search input#keyword').on('input', function() {
29    if(jQuery(this).val() == ""){
30      jQuery('#hnav_search').removeClass('suggest_on');
31    } else {
32      jQuery('#hnav_search').addClass('suggest_on');
33    }
34  });
35  
36	//--- マイページ
37  if(jQuery('body').hasClass('page-menu')){
38    jQuery('.block-mypage--inner-child-name').addClass('close');
39    jQuery('.block-mypage--inner-child-name').next('.block-mypage--inner-child-list').hide();
40    jQuery('.block-mypage--inner-child-name').click(function(){
41			if(jQuery(this).hasClass('close')){
42				jQuery(this).removeClass('close');
43				jQuery(this).next('.block-mypage--inner-child-list').slideDown();
44			} else {
45				jQuery(this).addClass('close');
46				jQuery(this).next('.block-mypage--inner-child-list').slideUp();
47			}
48		});
49  }
50  
51	//--- アンケート
52  if(jQuery('body').hasClass('page-questionnaireform')){
53    jQuery('.block-questionnaire--box-content input[type=checkbox], .block-questionnaire--box-content input[type=radio]').each(function(){
54      var enq_id = jQuery(this).attr('id');
55      jQuery(this).wrap('<div class="check-wrap ' + enq_id + '" />');
56    });
57    jQuery('.block-questionnaire--box-content label').each(function(){
58      var Label = jQuery(this).attr('for');
59      jQuery('.check-wrap.' + Label).append(jQuery(this));
60    });
61  }
62});
63
64jQuery(window).on('load',function() {
65  
66  //---Sale Raning
67  CalcSalesPerForRanking();
68
69  //---Sale Pickup
70  CalcSalesPerForPickup();
71
72});
73
74function CalcSalesPerForRanking(){
75  if(jQuery('.block-ranking-r--price-infos.onsale').length){
76    jQuery('.block-ranking-r--price-infos.onsale').each(function(){
77      if(jQuery(this).find('span.sale-per-icon').length > 0){
78        // 次のループへ
79        return true;
80      }
81
82      if(jQuery(this).find('.block-ranking-r--default-price').length && jQuery(this).find('.format-price').length){
83        var r_default_p = jQuery(this).find('.block-ranking-r--default-price').text().replace(/[^0-9]/g, '');
84        var r_sale_p    = jQuery(this).find('.format-price').text().replace(/[^0-9]/g, '');
85        if(r_default_p != 0 && r_sale_p != 0){
86          // 計算処理中でparseIntを追加
87          var r_SalePer   = (100 - parseInt((r_sale_p / r_default_p) * 100));
88          // var r_OffPer    = Math.trunc(r_SalePer); IE非対応
89          var r_OffPer    =  parseInt(r_SalePer, 10);
90          if(r_OffPer != 0){
91            jQuery(this).find('.block-ranking-r--price').append('<span class="sale-per-icon">' + r_OffPer + '%OFF</span>');
92          }
93        }
94      }
95    });
96  }
97}
98
99function CalcSalesPerForPickup(){
100  if(jQuery('.block-pickup-list-p--price-infos.onsale').length){
101    jQuery('.block-pickup-list-p--price-infos.onsale').each(function(){
102      if(jQuery(this).find('span.sale-per-icon').length > 0){
103        // 次のループへ
104        return true;
105      }
106
107      if(jQuery(this).find('.block-pickup-list-p--default-price').length && jQuery(this).find('.format-price').length){
108        var p_default_p = jQuery(this).find('.block-pickup-list-p--default-price').text().replace(/[^0-9]/g, '');
109        var p_sale_p    = jQuery(this).find('.format-price').text().replace(/[^0-9]/g, '');
110        if(p_default_p != 0 && p_sale_p != 0){
111          // 計算処理中でparseIntを追加
112          var p_SalePer   = (100 - parseInt((p_sale_p / p_default_p) * 100));
113          // var p_OffPer    = Math.trunc(p_SalePer); IE非対応
114          var p_OffPer    =  parseInt(p_SalePer, 10);
115          if(p_OffPer != 0){
116            jQuery(this).find('.block-pickup-list-p--price').append('<span class="sale-per-icon">' + p_OffPer + '%OFF</span>');
117          }
118        }
119      }
120    });
121  }
122}
123
124jQuery(window).on('scroll resize', function () {
125
126	if (jQuery(this).scrollTop() > 120) {
127		jQuery('#footer_pagetop').show();
128	} else if (jQuery(this).scrollTop() < 80) {
129		jQuery('#footer_pagetop').hide();
130	}
131
132});
133
134window.lazySizesConfig = window.lazySizesConfig || {};
135/* lazysizesの設定の変更はここから記述してください
136  ・window.lazySizesConfig.expandは、大きな画像を早めに読み込み開始させたい場合などに使用してください
137    正の値を指定すると読み込み開始スクロール位置が上に(早く)なります
138    負の値を設定すると読み込み開始スクロール位置が下に(遅く)なります
139    ※lazySizesConfig.expandを指定しない場合、画像の読み込み状況やブラウザのアイドリング状況に応じて動的に最適化されますが
140      指定すると動的な最適化が無効になることに注意してください
141*/
142
143jQuery(window).on('load', function () {
144  if (jQuery('.page-cart').length > 0) {
145    jQuery('.promotion-criteria-list-message').insertBefore('.block-cart--procedure');
146    jQuery('.promotion-criteria-list-message').show();
147    let str = jQuery('.block-cart--continue-shopping').html().replace(/&gt;/g, '');
148    jQuery('.block-cart--continue-shopping').html(str);
149    if (jQuery('.promotion-criteria-list-message span').hasClass('promotion-criteria')) {
150      jQuery('.block-cart--continue-shopping').appendTo('.promotion-criteria-list-message');
151    }
152  }
153});
154
155// Recommend
156window.LightningRecommendEventV2 = window.LightningRecommendEventV2 || [];
157window.LightningRecommendEventV2.push({
158    ready: function(){
159            /* タブ切り替え */
160            jQuery(document).on('click', 'div.event_tab_title_ .topevent_title_ a', function(){
161                var tabIndexNum = jQuery(this).parent().index();
162                jQuery('div.event_tab_title_ .topevent_title_ a').parent().removeClass('active_')
163                jQuery(this).parent().addClass('active_');
164                jQuery('.block-ranking-lightningrecommend').removeClass('active_');
165                jQuery('.block-ranking-lightningrecommend').eq(tabIndexNum).addClass('active_');
166            });
167    },
168    create: function(evt){
169    },
170    mount: function(evt){
171        if(this.nodeType == Node.ELEMENT_NODE){
172            jQuery(this).addClass('active_');
173
174            //スライダー化
175            if(jQuery(this).find('.block-ranking-r--items li dl').length > 5){               
176                jQuery('ul.block-ranking-r--items li', this).bxSlider({
177                    auto: false,
178                    speed: 1500,
179                    pause: 0,
180                    pager:  true,
181                    controls: true,
182                    slideWidth: 200,
183                    slideMargin: 50,
184                    minSlides:5,
185                    maxSlides:5,
186                    moveSlides:5,
187                    infiniteLoop: false,
188                    hideControlOnEnd: true,
189                });
190            }
191            CalcSalesPerForRanking();
192            CalcSalesPerForPickup();
193        }
194    },
195    load: function(){
196    },
197    showParams: function(evt){
198        if(evt.tagsCode == "top_main_pc" && evt.params.filterCode == "c12"){
199            evt.params.span = "month";
200        }
201    }
202});
203
204//---アイコンのレイアウト変更
205jQuery(window).on('load',function() {
206  if (jQuery('.block-goods-detail .block-goods-list-item-noshi_msg').length || jQuery('.block-goods-detail .block-goods-list-item-wrap_msg')) {
207    jQuery('.block-goods-detail .pane-goods-right-side .block-icon,.block-goods-detail .block-goods-list-item-noshi_msg,.block-goods-detail .block-goods-list-item-wrap_msg').wrapAll('<div class="block-icon-wrap"  style="order: 30;">');
208  }
209});
210
211//2024.04.02 スライダー化
212window.LightningRecommendEventV2 = window.LightningRecommendEventV2 || [];
213window.LightningRecommendEventV2.push({
214    ready: function(){
215    },
216    create: function(evt){
217    },
218    mount: function(evt){
219        if(this.nodeType == Node.ELEMENT_NODE && jQuery(this).parent().hasClass('ranking_slider_lightningrecommend')){
220            jQuery(this).addClass('active_');
221            if(jQuery(this).find('.block-ranking-r--item').length > 5){               
222                jQuery('ul.block-ranking-r--items', this).bxSlider({
223                    auto: false,
224                    speed: 1500,
225                    pause: 0,
226                    pager:  true,
227                    controls: true,
228                    slideWidth: 200,
229                    slideMargin: 50,
230                    minSlides:5,
231                    maxSlides:5,
232                    moveSlides:5,
233                    infiniteLoop: false,
234                    hideControlOnEnd: true,
235                });
236            }
237            CalcSalesPerForRanking();
238            CalcSalesPerForPickup();
239        }
240        if(this.nodeType == Node.ELEMENT_NODE && jQuery(this).hasClass('block-lightningrecommend')){
241            jQuery(this).addClass('active_');
242            if(jQuery(this).find('.block-lightningrecommend-r--goods').length >= 5){               
243                jQuery('ul.block-lightningrecommend-r--items li', this).bxSlider({
244                    auto: false,
245                    speed: 1500,
246                    pause: 0,
247                    pager:  true,
248                    controls: true,
249                    slideWidth: 200,
250                    slideMargin: 50,
251                    minSlides:5,
252                    maxSlides:5,
253                    moveSlides:5,
254                    infiniteLoop: false,
255                    hideControlOnEnd: true,
256                });
257            }
258        }
259    },
260    load: function(){
261    }
262});

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.