PageSourceSearch

https://matsumoto.ed.jp/wp-content/themes/insp_para/theme/js/pe/pixelentity.controller.js?ver=1561346650

js matsumoto.ed.jp collected 2026-10-05 09:40:01 UTC 6,695 bytes, 257 lines download raw bytes

1(function ($) {
2	"use strict";
3	/*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false */
4	/*jshint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false, validthis: true */
5	/*global jQuery,setTimeout,clearTimeout,projekktor,location,setInterval,YT,clearInterval,pixelentity,prettyPrint */
6	
7	var links,menu;
8	var jwin = $(window),sc;
9	var jhtml = $("html");
10	var body;
11	var dropdowns;
12	var container;
13	var containerH = 0,h = 0;
14	var scroller;
15	var filterable = false,isotope = false;
16	var layoutSwitcher = false;
17	var cells;
18	var overs;
19	var containerHeightTimer = 0;
20	var footer,header,arrows,mobile,background;
21	var fullpage;
22	
23	window.peGmapStyle = [
24        {
25            stylers: [
26                { saturation: -100 }
27            ]
28        },{
29            featureType: "road",
30            elementType: "geometry",
31            stylers: [
32                { lightness: 100 },
33                { visibility: "simplified" }
34            ]
35        },{
36            featureType: "road",
37            elementType: "labels",
38            stylers: [
39                { visibility: "off" }
40            ]
41        }
42    ];
43	
44	function imgfilter() {
45		return this.href.match(/\.(jpg|jpeg|png|gif)$/i);
46	}
47	
48	pixelentity.classes.Controller = function() {
49		
50		var w,h;
51		var active;
52		var nav;
53		
54		function autoFlare(idx,el) {
55			el = $(el);
56			el.attr("data-target","flare");
57		}
58		
59		function mobileNavigation() {
60			var li = dropdowns.filter(this).parent();
61			if (li.hasClass("dropdown-on")) {
62				li.removeClass("dropdown-on").find(".dropdown-on").removeClass("dropdown-on");
63			} else {
64				li.addClass("dropdown-on");
65			}
66			li.siblings(".dropdown-on").removeClass("dropdown-on").find(".dropdown-on").removeClass("dropdown-on");
67			return false;
68		}
69		
70		function menuAlign(idx) {
71			var item = menu.eq(idx);
72			var sitem,submenu = item.find("ul.sub-menu").removeClass("rightAlign");
73			var i,endPos = item.width()+item.parent().offset().left;
74			if (endPos >= w) {
75				item.addClass("rightAlign");
76			} else {
77				for (i=0;i<submenu.length;i++) {
78					sitem = submenu.eq(i);
79					if (endPos+sitem.width() > w) {
80						sitem.addClass("rightAlign");
81					}
82				}
83			}
84		}
85		
86		function fullPageResize() {
87			fullpage.find(".peNeedResize").triggerHandler("resize");
88		}
89
90		
91		function resize() {
92			w = jwin.width();
93			h = window.innerHeight ? window.innerHeight: jwin.height();
94			
95			if (fullpage.length > 0) {
96				fullpage.height(Math.max(300,h-header.outerHeight()-footer.outerHeight()));
97				fullPageResize();
98				setTimeout(fullPageResize,500);
99				if ($.browser.msie && $.browser.version < 10) {
100					setTimeout(fullPageResize,1500);
101					setTimeout(fullPageResize,2000);
102					setTimeout(fullPageResize,2000);
103				}
104			}
105			
106			menu.removeClass("rightAlign").each(menuAlign);
107		}
108		
109		function makeAnimated(e) {
110			cells.filter(e.currentTarget).find("div.scalable img").addClass("animated");			
111		}
112		
113		function addIcons(idx) {
114			var cell = cells.eq(idx);
115			var link,title = cell.find("span.cell-title");
116			var gotone = false;
117			link = title.find("> a"); 
118			if (link.length > 0) {
119				gotone = true;
120				title.html('<span>'+link.html()+"</span>");
121				link.addClass("pe-over-icon pe-over-icon-link").html('<i class="icon-info"></i>');
122				title.addClass("has-icons").append(link);
123			}
124			
125			link = cell.find(".scalable > a[data-target=flare]");
126			
127			if (link.length > 0) {
128				link = link.clone(true);
129				link.addClass("pe-over-icon pe-over-icon-lb").html('<i class="icon-plus"></i>');
130				if (!gotone) {
131					title.wrapInner("<span></span>");
132					gotone = true;
133				}
134				title.addClass("has-icons").append(link);
135			}
136			
137			if (gotone) {
138				title.wrapInner('<span></span>');
139			}
140		}
141		
142		function addHover(idx) {
143			var a = overs.eq(idx);
144			
145			a.prepend('<span class="cell-title"><span><i class="icon-%0"></i></span></span>'.format(a.attr("data-target") == "flare" ? "plus" : "info"));
146			
147		}
148		
149		function overEffect(e) {
150			var a = overs.filter(e.currentTarget);
151			var img = a.find("img");
152			img.addClass("animated");
153			a[e.type === "mouseenter" ? "addClass" : "removeClass"]("pe-status-over");
154			//console.log(e.currentTarget);
155		}
156		
157		function sticky(e) {
158			if (jwin.scrollTop() > 45) {
159				body.addClass("sticky-header");
160			} else {
161				body.removeClass("sticky-header");				
162			}
163		}
164
165		
166		function start() {
167			
168			body = $("body");
169			mobile = $.pixelentity.browser.mobile;
170			
171			if (mobile) {
172				$("a[data-rel='tooltip']").removeAttr("data-rel");
173				jhtml.removeClass("desktop").addClass("mobile");
174				if ($.pixelentity.browser.android) {
175					jhtml.addClass("android");
176				}
177			} else {
178				jhtml.addClass("desktop").removeClass("mobile");
179			}
180			
181			header = $(".site-wrapper > .sticky-bar");
182			footer = $(".site-wrapper > .footer");
183			fullpage = $(".site-wrapper > .site-body > .pe-full-page");
184			menu = header.find("ul.nav > li > ul");
185			var topLevel = header.find("ul:eq(0) > li > a ");
186			/*
187			topLevel.each(function (idx) {
188				var tl = topLevel.eq(idx);
189				var icon = tl.find("b.icon-down-open-mini").detach();
190				
191				var text = tl.text().split("|");
192				tl.html($.trim(text[0]));
193				
194				if (icon.length > 0 ) {
195					tl.prepend(icon);
196				}
197				
198				tl.append('<span class="subtitle">'+($.trim(text[1]) || '&nbsp;')+'</span>');
199				
200			});
201			*/
202			
203			links = $('a[data-target!="flare"]').not('a[data-toggle]');
204			links.filter(imgfilter).each(autoFlare);
205			
206			if (!mobile) {
207				overs = $('a.over-effect');
208				overs.each(addHover);
209				overs.on("mouseenter mouseleave",overEffect);
210			}
211			
212			dropdowns = header.find("li.dropdown > a");
213			
214			if (mobile) {
215				dropdowns.on("touchstart",mobileNavigation);
216			}
217			
218			
219			$('a.peVideo').attr({
220				"data-autoplay": "disabled"
221			});
222			
223			//$.pixelentity.widgets.build($("body"),{});
224			
225			var cellTitles = $("span.cell-title");
226			cellTitles.each(function () {
227				var el = cellTitles.filter(this);
228				if (el.next().find("> a").length > 0) {
229					el.addClass("show-on-top");
230				}
231			});
232			
233			$("img[data-original]:not(img.pe-lazyload-inited)").peLazyLoading();
234
235			
236			if (mobile) {
237				setTimeout(function () {
238					//alert("ok");
239					jwin.triggerHandler("pe-lazyloading-refresh");
240				},100);
241			} else {
242				// $(".bw-images img").peBlackAndWhite();
243				cells = $(".peIsotopeGrid .peIsotopeItem");
244				cells.each(addIcons).one("mouseenter",makeAnimated);
245			}
246			
247			jwin.resize(resize);
248			jwin.on("load",resize);
249			//jwin.on("scroll",sticky);
250			resize();
251			
252		}
253		
254		start();
255	};
256	
257}(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.