PageSourceSearch

https://www.lintec-global.com/common/js/cookie.js

js lintec-global.com collected 2026-10-02 19:04:17 UTC 3,006 bytes, 96 lines download raw bytes

1/* ===================================================================
2* クッキー
3=================================================================== */
4
5function getCookie(c_name){
6	var st="";
7	var ed="";
8	if(document.cookie.length>0){
9		st=document.cookie.indexOf(c_name + "=");
10		if(st!=-1){
11			st=st+c_name.length+1;
12			ed=document.cookie.indexOf(";",st);
13			if(ed==-1) ed=document.cookie.length;
14			return unescape(document.cookie.substring(st,ed));
15		}
16	}
17	return "";
18}
19function setCookie(c_name,value,expiredays){
20	var extime = new Date().getTime();
21	var cltime = new Date(extime + (60*60*24*1000*expiredays));
22	var exdate = cltime.toUTCString();
23	var s="";
24	s += c_name +"="+ escape(value);
25	s += "; path=/";
26	if(expiredays){
27		s += "; expires=" +exdate+"; ";
28	}else{
29		s += "; ";
30	}
31	document.cookie=s;
32}
33
34var cc = getCookie('cookie_check');
35if(cc==''){
36	var alertHtml = '<div id="FooterPolicy" class="Fixed"><div class="PolicyBox Inner"><p>This website uses cookies to improve convenience for users, to statistically understand how the site is used, and for other purposes. Please read the <a class="LinkWh" href="/others/terms/cookie/">Cookie Policy</a> and, if you consent to the use of cookies, click the "Agree and close" button.</p><div class="PolicyBtn"><span>Agree and close</span></div></div></div>';
37	var alertElm;
38	$(window).on('load', function(){
39		$('#pagetop').addClass('PolicyOn');
40		var windowWidth = $(window).width();
41		var windowSm = 640;
42		if (windowWidth <= windowSm) {
43			//スマホ時
44			$('#pagetop').after(alertHtml);
45		} else {
46			//PC時
47			$('#footerContainer').before(alertHtml);
48		}
49		alertElm = $('#FooterPolicy');
50		setTimeout(function(){
51			alertElm.fadeIn(500);
52		},50)
53		alertElm.on('click', '.PolicyBtn', (function(){
54			setCookie('cookie_check','approval',30);
55			alertElm.fadeOut(500);
56			$('#pagetop').removeClass('PolicyOn');
57		}));
58	});
59}else{
60	setCookie('cookie_check','approval',30);
61}
62
63	//フッターメニュー表示位置
64
65$(window).on('scroll load', function() {
66var windowWidth = $(window).width();
67var windowSm = 640;
68var pos;
69var footerHeight;
70var FooterPolicyHeight
71var windowHeight = $(window).height();
72var scroll = $(window).scrollTop() + windowHeight
73if (windowWidth <= windowSm) {
74	//スマホ時
75	footerHeight = $('#footerContainer').offset().top;
76	var pagetopHeight = $('#pagetop').innerHeight();
77	FooterPolicyHeight = $('#FooterPolicy').innerHeight();
78	pos = footerHeight + pagetopHeight + FooterPolicyHeight
79	if(scroll >= pos) {
80		$('#FooterPolicy').removeClass('Fixed');
81		$("#pagetop.PolicyOn").css('margin-bottom','0');
82	} else {
83		$('#FooterPolicy').addClass('Fixed');
84		$("#pagetop.PolicyOn").css('margin-bottom',FooterPolicyHeight + 'px');
85	}
86} else {
87	//PC時
88	pos = $('#footerContainer').offset().top;
89	if(scroll >= pos) {
90		$('#FooterPolicy').removeClass('Fixed');
91	} else {
92		$('#FooterPolicy').addClass('Fixed');
93	}
94}
95});
96

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.