PageSourceSearch

https://6waves.jp/admin/js/footerFixed.js

js 6waves.jp collected 2026-09-24 09:47:09 UTC 1,970 bytes, 74 lines download raw bytes

1/*--------------------------------------------------------------------------*
2 *
3 *  footerFixed.js
4 *
5 *  MIT-style license.
6 *
7 *  2007 Kazuma Nishihata [to-R]
8 *  http://blog.webcreativepark.net
9 *
10 *--------------------------------------------------------------------------*/
11
12new function(){
13
14	var footerId = "footer";
15	//メイン
16	function footerFixed(){
17		//ドキュメントの高さ
18		var dh = document.getElementsByTagName("body")[0].clientHeight;
19		//フッターのtopからの位置
20		document.getElementById(footerId).style.top = "0px";
21		var ft = document.getElementById(footerId).offsetTop;
22		//フッターの高さ
23		var fh = document.getElementById(footerId).offsetHeight;
24		//ウィンドウの高さ
25		if (window.innerHeight){
26			var wh = window.innerHeight;
27		}else if(document.documentElement && document.documentElement.clientHeight != 0){
28			var wh = document.documentElement.clientHeight;
29		}
30		if(ft+fh<wh){
31			document.getElementById(footerId).style.position = "relative";
32			document.getElementById(footerId).style.top = (wh-fh-ft-1)+"px";
33		}
34	}
35
36	//文字サイズ
37	function checkFontSize(func){
38
39		//判定要素の追加
40		var e = document.createElement("div");
41		var s = document.createTextNode("S");
42		e.appendChild(s);
43		e.style.visibility="hidden"
44		e.style.position="absolute"
45		e.style.top="0"
46		document.body.appendChild(e);
47		var defHeight = e.offsetHeight;
48
49		//判定関数
50		function checkBoxSize(){
51			if(defHeight != e.offsetHeight){
52				func();
53				defHeight= e.offsetHeight;
54			}
55		}
56		setInterval(checkBoxSize,1000)
57	}
58
59	//イベントリスナー
60	function addEvent(elm,listener,fn){
61		try{
62			elm.addEventListener(listener,fn,false);
63		}catch(e){
64			elm.attachEvent("on"+listener,fn);
65		}
66	}
67
68	addEvent(window,"load",footerFixed);
69	addEvent(window,"load",function(){
70		checkFontSize(footerFixed);
71	});
72	addEvent(window,"resize",footerFixed);
73
74}

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.