PageSourceSearch

https://matsumoto.ed.jp/wp-content/themes/insp_para/framework/js/p…are.lightbox.render.image.js?ver=1561346630

js matsumoto.ed.jp collected 2026-10-05 09:39:38 UTC 2,127 bytes, 101 lines download raw bytes

1(function ($) {
2	/*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false */ 
3	/*global jQuery,setTimeout,location,setInterval,YT,clearInterval,clearTimeout,pixelentity,Spinner */
4	
5	var lb;
6	
7	if (!$.pixelentity || !(lb = $.pixelentity.lightbox)) {
8		return;
9	}
10	
11	function Render(id,w,h) {
12		
13		var img;
14		var iw,ih;
15		var loading = false;
16		var output = false;
17		var conf;
18		
19		function load(el) {
20			conf = el;
21			lb.signal("locked",id);
22			preload(el);
23			return this;
24		}
25		
26		function unlock() {
27			lb.signal("unlocked",id);
28		}
29
30		function resize(nw,nh) {
31			w = nw;
32			h = nh;
33			if (img) {
34				var offset = 0;
35				if (conf.scale == "fit") {
36					offset = 40;
37				}
38				
39				var scaler = $.pixelentity.Geom.getScaler(conf.scale,"center","center",w-offset,h-offset,iw,ih);
40				img.transform(
41					scaler.ratio,
42                    parseInt(scaler.offset.w,10)+offset/2,
43					parseInt(scaler.offset.h,10)+offset/2,
44					iw,
45                    ih,
46                    true,
47					$.pixelentity.browser.android && $.pixelentity.browser.android < 3 
48				);
49				
50			}
51			return this;
52		}
53		
54		function loaded() {
55			iw = img[0].naturalWidth || img[0].width || img.width();
56			ih = img[0].naturalHeight || img[0].height || img.height();
57			lb.signal("loaded",id);
58			setTimeout(unlock,500);
59
60		}
61		
62		function render() {
63			if (!output) {
64				output = $('<div class="peFlareLightboxRenderImage" />').append(img.addClass(conf.scale));
65				img.wrap("<div/>");				
66			}
67			return output;
68		}
69
70		
71		function preload(el) {
72			loading = true;
73			img = $('<img class="singleImage" src="%0"/>'.format(el.resource));
74			lb.addToBuffer(img);
75			$.pixelentity.preloader.load(img,loaded);
76		}
77		
78		function destroy() {
79			img = undefined;
80			if (output) {
81				output.detach();
82				output = undefined;				
83			}
84			lb.signal("destroy",id);
85		}
86
87
88		$.extend(this, {
89			// plublic API
90			load: load,
91			preload: preload,
92			resize: resize,
93			render: render,
94			isGallery: false,
95			destroy: destroy
96		});
97	}
98	
99	lb.register(Render,"default");
100	
101}(jQuery));

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.