PageSourceSearch

https://www.ec-store.net/js/sws/usr/operation/header.js

js ec-store.net collected 2026-09-25 18:38:47 UTC 7,893 bytes, 188 lines download raw bytes

1jQuery(function(){
2	var date = new Date();
3	var year = date.getFullYear().toString();
4	var month = (date.getMonth() + 1).toString().padStart(2, 0);;
5	var day = date.getDate().toString().padStart(2, 0);
6	var hours = date.getHours().toString().padStart(2, 0);
7	var Minutes = date.getMinutes().toString().padStart(2, 0);
8	var Seconds = date.getSeconds().toString().padStart(2, 0);
9	var nowTime = year + month + day + hours + Minutes + Seconds;
10	var deviceContents = jQuery("meta[property='etm:device']").attr('content');
11	var shop = jQuery('#zs-info-genre').data('genre');
12	var bradlistCount = 0;
13	//ブランド
14	jQuery.getJSON("/js/sws/usr/operation/janreLink_new.json", function(branddata){
15		for(var i in branddata){
16			for(var j in branddata[i].brand){
17				if(shop == "OLT"){
18					if(branddata[i].brand[j].outlet == 1){
19						if(nowTime >= branddata[i].brand[j].outlet_startdate && nowTime <= branddata[i].brand[j].outlet_enddate){
20							if(deviceContents == "mobile"){
21								jQuery('.block-header-nav--side-list-accordion #header_brandlist').append('<p><a href="' + branddata[i].brand[j].outlet_URL + '">' +
22																		branddata[i].brand[j].name +
23																		'</a></p>');
24							}else{
25								jQuery('.block-globalnav--dropmenu-brand-list').append('<li><a href="' + branddata[i].brand[j].outlet_URL + '">' +
26																			branddata[i].brand[j].name +
27																			'</a></li>');
28							};
29						};
30					bradlistCount = bradlistCount + 1;
31					};
32				}else{
33					if(nowTime >= branddata[i].brand[j].startdate && nowTime <= branddata[i].brand[j].enddate){
34						if(deviceContents == "mobile"){
35							jQuery('.block-header-nav--side-list-accordion #header_brandlist').append('<p><a href="' + branddata[i].brand[j].URL + '">' +
36																		branddata[i].brand[j].name +
37																		'</a></p>');
38						}else{
39							jQuery('.block-globalnav--dropmenu-brand-list').append('<li><a href="' + branddata[i].brand[j].URL + '">' +
40																			branddata[i].brand[j].name +
41																			'</a></li>');
42						};
43					};
44					bradlistCount = bradlistCount + 1;
45				};
46			};
47			
48			//if(deviceContents != "mobile"){
49			//	if(bradlistCount % 4 == 1){
50			//		jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li><li></li><li></li>');
51			//	}else if(bradlistCount % 4 == 2){
52			//		jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li><li></li>');
53			//	}else if(bradlistCount % 4 == 3){
54			//		jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li>');
55			//	};
56			//};
57		};
58
59		//TWJ導線追加
60		twj_add();
61
62		//ブランド数カウント・PCデザイン調整
63		var brand_cnt = jQuery('ul.block-globalnav--dropmenu-brand-list li').length;
64		if(deviceContents != "mobile"){
65			if(brand_cnt % 4 == 1){
66				jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li><li></li><li></li>');
67			}else if(brand_cnt % 4 == 2){
68				jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li><li></li>');
69			}else if(brand_cnt % 4 == 3){
70				jQuery('.block-globalnav--dropmenu-brand-list').append('<li></li>');
71			};
72		};
73
74	});
75	
76	var catecnt = 0;
77	jQuery.getJSON("/js/sws/usr/operation/category.json", function(categorydata){
78		for(var i in categorydata){
79			if(nowTime >= categorydata[i].startdate && nowTime <= categorydata[i].enddate){
80				catecnt = catecnt + 1;
81				if(shop == "OLT"){
82					if(deviceContents == "mobile"){
83						if(i == 0){
84							jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=OLT&stock=2">' +
85																		'すべて' +
86																		'</a></p>');
87						};
88						jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=OLT&category=' + categorydata[i].id + '&stock=2">' +
89																		categorydata[i].category_name +
90																		'</a></p>');
91					}else{
92						if(i == 0){
93							jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=OLT&stock=2">' +
94																			'ALL' +
95																			'</a></li>');
96						};
97						jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=OLT&category=' + categorydata[i].id + '&stock=2">' +
98																			categorydata[i].category_name +
99																			'</a></li>');
100					};
101				}else{
102					if(deviceContents == "mobile"){
103						if(i == 0){
104							jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=SWS">' +
105																		'すべて' +
106																		'</a></p>');
107						};
108						jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=SWS&category=' + categorydata[i].id + '">' +
109																		categorydata[i].category_name +
110																		'</a></p>');
111					}else{
112						if(i == 0){
113							jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=SWS">' +
114																			'ALL' +
115																			'</a></li>');
116						};
117						jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=SWS&category=' + categorydata[i].id + '">' +
118																			categorydata[i].category_name +
119																			'</a></li>');
120					};
121				};
122			};
123		};
124		
125		//セットアップ追加
126		catecnt = catecnt + 1;
127		if(shop == "OLT"){
128			if(deviceContents == "mobile"){
129				jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=OLT&q=セットアップ&stock=2">' +
130																		'セットアップ' +
131																		'</a></p>');
132			}else{
133				jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=OLT&q=セットアップ&stock=2">' +
134																			'セットアップ' +
135																			'</a></li>');
136			}
137		}else{
138			if(deviceContents == "mobile"){
139				jQuery('.block-header-nav--side-list-accordion #header_categorylist').append('<p><a href="/sws/goods/search.aspx?genre=SWS&q=セットアップ">' +
140																		'セットアップ' +
141																		'</a></p>');
142			}else{
143				jQuery('.block-globalnav--dropmenu-category-list').append('<li><a href="/sws/goods/search.aspx?genre=SWS&q=セットアップ">' +
144																			'セットアップ' +
145																			'</a></li>');
146			}
147		}
148
149		if(deviceContents != "mobile"){
150			//var categoryCount = Number(i) + 2;
151			var categoryCount = Number(catecnt) + 1;
152			if(categoryCount % 4 == 1){
153				jQuery('.block-globalnav--dropmenu-category-list').append('<li></li><li></li><li></li>');
154			}else if(categoryCount % 4 == 2){
155				jQuery('.block-globalnav--dropmenu-category-list').append('<li></li><li></li>');
156			}else if(categoryCount % 4 == 3){
157				jQuery('.block-globalnav--dropmenu-category-list').append('<li></li>');
158			};
159		};
160	});
161	jQuery(function() {
162	//ハンバーガ内制御
163	if(deviceContents == "mobile"){
164		jQuery('.accordion-title').click(function(){
165			if(jQuery(this).hasClass('open') == false){
166				jQuery(this).addClass('open');
167			}else{
168				jQuery(this).removeClass('open');
169			};
170		});
171	};
172});
173	//TWJ導線追加
174	function twj_add() {
175		if(shop == "SWS"){
176			if(deviceContents == "mobile"){
177				jQuery('.block-header-nav--side-list-accordion #header_brandlist').append('<p id="hed_twj"><a href="/sws/r/rTWJ/" target="_blank">' +
178						'TOKYO WEEKLY JOURNAL' +
179						'</a></p>');
180			}else{
181				jQuery('.block-globalnav--dropmenu-brand-list').append('<li id="hed_twj"><a href="/sws/r/rTWJ/" target="_blank">' +
182						'TOKYO WEEKLY JOURNAL' +
183						'</a></li>');
184			}
185		}
186	}
187
188});

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.