PageSourceSearch

https://www.japanet.co.jp/shopping/js/footer_include.js

js japanet.co.jp collected 2026-10-01 11:25:45 UTC 6,814 bytes, 161 lines download raw bytes

1// ‰{———š—ðƒ‚ƒWƒ…[ƒ‹‚̒ljÁ
2$(function(){
3	if(!location.href.match('/goods/')){
4		const insertCHKHIS = document.getElementsByTagName('script')[0];
5		// ‰{———š—ð‹@”\’ljÁ(JS/Šù‚ÉŒ³‚©‚ç—v‘f‚ª‚ ‚邯‚±‚ë‚͏œŠO)
6		let chkhisescript_tag = document.createElement('script');
7		chkhisescript_tag.type = 'text/javascript';
8		chkhisescript_tag.async = true;
9		chkhisescript_tag.src =  '/shopping/common/js/checkHistory.js';
10		insertCHKHIS.parentNode.insertBefore(chkhisescript_tag, insertCHKHIS.nextSibling);
11	}
12});
13
14// ƒGƒAƒRƒ“Ý’uƒN[ƒ|ƒ“•t—^
15$(function() {
16    // 1. ŽÀsŠúŠÔ‚Ì‘S‘̐§Œä (2026”N4ŒŽ1“ú 00:00:00 ‚æ‚è‘O‚܂ŎÀs)
17    var now = new Date();
18    var limitDate = new Date('2026-04-01T00:00:00');
19    if (now >= limitDate) return;
20
21    // ¡“ú‚Ì“ú•t‚ð YYYYMMDD Œ`Ž®‚̐”’l‚Ŏ擾i‰ß‹Ž“ú”»’è—pj
22    var todayStr = now.getFullYear() + 
23                   ('0' + (now.getMonth() + 1)).slice(-2) + 
24                   ('0' + now.getDate()).slice(-2);
25    var todayNum = parseInt(todayStr, 10);
26
27    // 2. ƒy[ƒW”»’è‚Æƒf[ƒ^’Šo
28    if (location.href.match('/shopping/cart/CartHub.do')) {
29        // src‘®«‚ðŽ‚½‚È‚¢iHTML‚É’¼Ú‘‚©‚ꂽjscriptƒ^ƒO‚݂̂𑖍¸‚µ‚č‚‘¬‰»
30        $('script:not([src])').each(function() {
31            var scriptText = $(this).text();
32
33            // ”»’èðŒFGA4Layer‚ªŠÜ‚Ü‚êA‚©‚ WD, W0, WG, WJD02, WT ‚Ì‚¢‚¸‚ê‚©‚ðŠÜ‚Þ
34            var hasTargetKeywords = /WD|W0|WG|WU|WJD|WT/.test(scriptText);
35
36            if (scriptText.indexOf('GA4Layer.push') > -1 && 
37                scriptText.indexOf('GoodsDetail') > -1 && 
38                hasTargetKeywords) {
39
40                var suffix = null;
41                // ƒJƒeƒSƒŠ[”»’è
42                if (scriptText.indexOf('_704_') > -1) {
43                    suffix = 'air'; // ƒGƒAƒRƒ“
44                } else if (/_101_|_603_|_2202_|_601_/.test(scriptText)) {
45                    suffix = '';    // ƒeƒŒƒrE—â‘ ŒÉEô‘ó‹@Eƒ}ƒbƒT[ƒW‹@
46                }
47
48                // ‘ΏۊOƒJƒeƒSƒŠ[‚È‚çI—¹
49                if (suffix === null) return false;
50
51                // ‰æ‘œƒpƒX‚Ì’è‹`
52                var tableBannerSrc = (suffix === 'air') ? '/shopping/img/genre/aircon/coupon_pc_260328.png' : '/shopping/img/special/shitadori2026/lp/bnr_coupon_pc2.png';
53                var koujiBannerSrc = '/shopping/img/special/shitadori2026/coupon3000.png';
54
55                var applyBanners = function() {
56                    // ‘ΏۍHŽ–“úƒŠƒXƒg
57                    var dates = ['20260327', '20260328', '20260329', '20260330', '20260331', '20260401', '20260402', '20260403'];
58                    var isAnyDateVisible = false;
59
60                    // --- ƒJƒŒƒ“ƒ_[“à‚̏ˆ— ---
61                    dates.forEach(function(dateStr) {
62                        if (parseInt(dateStr, 10) < todayNum) return;
63
64                        var elementId = '#workDate_' + dateStr + suffix;
65                        $(elementId).find('td').each(function() {
66                            var $link = $(this).find('a');
67                            // HŽ–ƒ{ƒ^ƒ“i‹ó—LE‘I‘𒆁EƒLƒƒƒ“ƒy[ƒ“j‚ð“Á’è
68                            var $targetImg = $link.find('img[src*="kouji-botan-1.gif"], img[src*="kouji-botan-3.gif"], img[src*="kouji-button_campaign"]');
69                            
70                            if ($targetImg.length > 0) {
71                                isAnyDateVisible = true; // —LŒø‚È“ú•t‚ð”­Œ©
72
73                                // aƒ^ƒO“à‚Ì‘|œiƒ{ƒ^ƒ“ˆÈŠO‚ðÁ‚·j
74                                $link.find('img').not($targetImg).remove();
75                                $link.find('br').remove();
76                                
77                                // aƒ^ƒO‚ÌŠOi’¼Œãj‚Ì‘|œ‚Æ banner3.png ‚Ì”z’u
78                                $(this).find('.added-coupon-banner').remove();
79                                $link.after('<div class="added-coupon-banner" style="margin-top:2px;"><img src="' + koujiBannerSrc + '" alt=""></div>');
80                            }
81                        });
82                    });
83
84                    // --- ƒe[ƒuƒ‹‰º‚̏ˆ— ---
85                    if (isAnyDateVisible) {
86                        if ($('.coupon-banner-wrapper').length === 0) {
87                            $('.kounyu_haisou_box').after('<div class="coupon-banner-wrapper" style="margin: 10px 0; text-align: center;"><img src="' + tableBannerSrc + '" alt="" style="width:100%"></div>');
88                        }
89                    } else {
90                        $('.coupon-banner-wrapper').remove();
91                    }
92                };
93
94                // ‰‰ñŽÀs
95                applyBanners();
96
97                // 3. ŠÄŽ‹‹@”\iDOM‚̕ω»‚ðŒŸ’m‚µ‚ăoƒi[‚ðˆÛŽj
98                var observer = new MutationObserver(function() {
99                    observer.disconnect();
100                    applyBanners();
101                    var targetNode = document.querySelector('.wrap3_2');
102                    if (targetNode) {
103                        observer.observe(targetNode, { childList: true, subtree: true });
104                    }
105                });
106
107                var targetNode = document.querySelector('.wrap3_2');
108                if (targetNode) {
109                    observer.observe(targetNode, { childList: true, subtree: true });
110                }
111
112                return false; // 1‚ÂŒ©‚‚©‚ê‚Îhead“à‚̃‹[ƒv‚ðI—¹
113            }
114        });
115    }
116});
117
118
119
120function doScroll(){
121	if(window.pageYOffset === 0){
122	window.scrollTo(0,1);
123	}
124	$("#footer_inc").load("/shopping/common/footer.html?r=160704");
125}
126var base_onload = window.onload;
127window.onload = function(){
128	if (base_onload != null) {
129	base_onload();
130	}
131	setTimeout(doScroll, 100);
132
133//V-varen[20180118]
134//----------------------------------------------------------------------------------------------------------------------------------
135	var isHereCancel = document.querySelectorAll('script')[20];
136	if( isHereCancel ){
137		isHereCancel = isHereCancel.innerHTML.indexOf('9088.html');
138		if( isHereCancel !== -1 ){
139			$(function(){
140				$('td.contents_02 p strong').each(function(){
141					var isThisCancel = $(this).text();
142					if( isThisCancel === 'V0004-00001'
143					||  isThisCancel === 'V0004-00002'
144					||  isThisCancel === 'WV777-00104'
145					||  isThisCancel === 'WV777-00103'){
146						var deleteCancel = $(this).closest('td.contents_02').next('td.contents_03').next('td.contents_04').children('a').eq(0).text().replace(/‚±‚Ì’•¶‚ðƒLƒƒƒ“ƒZƒ‹/g,'');
147						$(this).closest('td.contents_02').next('td.contents_03').next('td.contents_04').children('a').eq(0).text(deleteCancel);
148					}
149				});
150			});
151		}
152	}
153}
154flag = false;
155function treeMenu(tName) {
156	var h = document.body.scrollHeight - 45;
157	document.getElementById('wrapper').style.height = h + 'px';
158	tMenu = document.all[tName].style;
159	if(tMenu.display == 'none') tMenu.display = "block";
160	else tMenu.display = "none";
161}

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.