PageSourceSearch

https://syakunetsu.com/assets/js/jquery.height-line.js

js syakunetsu.com collected 2026-10-04 15:32:20 UTC 2,467 bytes, 94 lines download raw bytes

vendor: 2,467 bytes, lines 1-94
1;(function($){
2	$.fn.heightLine = function(){
3		var target = this,fontSizeChangeTimer,windowResizeId= Math.random();
4		var heightLineObj = {
5			op : {
6				"maxWidth" : 10000,
7				"minWidth" : 0,
8				"fontSizeCheck" : false
9			},
10			setOption : function(op){
11				this.op = $.extend(this.op,op);
12			},
13			destroy : function(){
14				target.css("height","");
15			},
16			create : function(op){
17				var self = this,
18					maxHeight = 0,
19					windowWidth = $(window).width();
20				self.setOption(op);
21				if( windowWidth<=self.op.maxWidth && windowWidth>=self.op.minWidth ){
22					target.each(function(){
23						if($(this).outerHeight()>maxHeight){
24							maxHeight = $(this).outerHeight();
25						}
26					}).each(function(){
27						var height = maxHeight
28								   - parseInt($(this).css("padding-top"))
29								   - parseInt($(this).css("padding-bottom"));
30						$(this).height(height);
31					});
32				}
33			},
34			refresh : function(op){
35				this.destroy();
36				this.create(op);
37			},
38			removeEvent :function(){
39				$(window).off("resize."+windowResizeId);
40				target.off("destroy refresh");
41				clearInterval(fontSizeChangeTimer);
42			}
43		}
44		if(typeof arguments[0] === "string" && arguments[0] === "destroy"){
45			target.trigger("destroy");
46		}else if(typeof arguments[0] === "string" && arguments[0] === "refresh"){
47			target.trigger("refresh");
48		}else{
49			heightLineObj["create"](arguments[0]);
50			
51			$(window).on("resize."+windowResizeId,function(){
52				heightLineObj["refresh"]();
53			});
54
55			target.on("destroy",function(){
56				heightLineObj["removeEvent"]();
57				heightLineObj["destroy"]();
58			}).on("refresh",function(){
59				heightLineObj["refresh"]();
60			});
61
62			if(heightLineObj.op.fontSizeCheck){
63				
64				if($("#fontSizeChange").length<=0){
65					var fontSizeChange = $("<span id='fontSizeChange'></span>").css({
66						width:0,
67						height:"1em",
68						position:"absolute",
69						left:0,
70						top:0
71					}).appendTo("body");
72				}
73				var defaultFontSize = $("#fontSizeChange").height();
74				fontSizeChangeTimer = setInterval(function(){
75					if(defaultFontSize != $("#fontSizeChange").height()){
76						heightLineObj["refresh"]();
77					}
78				},100);
79			}
80		}
81		return target;
82	}
83})(jQuery);
84
85/*!--------------------------------------------------------------------------*
86 *  
87 *  jquery.heightLine.js
88 *  
89 *  MIT-style license. 
90 *  
91 *  2013 Kazuma Nishihata 
92 *  http://www.to-r.net
93 *  
94 *--------------------------------------------------------------------------*/

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.