PageSourceSearch

https://cube-mau.jp/assets/scripts/cube.news.js

js cube-mau.jp collected 2026-10-08 08:12:56 UTC 4,545 bytes, 193 lines download raw bytes

1cube.news = (function ($) {
2	
3	var innerSelector = ".inner";
4
5	var moduleSelector = ".module";
6	var archivesSelector = ".archives";
7	var pagerSelector = ".pager";
8		
9	function news(element) {
10		var $window,
11			$inner,
12			$news,
13			$module,
14			$archives,
15			$pager
16			;
17		var modules = [],
18			currentItem
19		;
20		
21		$window = $(window);
22		
23		$news = element.jquery ? element : $(element);
24		$news.hide = hide;
25		$news.show = show;
26			
27		$module  = $news.find(moduleSelector);
28			
29		$archives  = $news.find(archivesSelector);
30			
31		$pager  = $news.find(pagerSelector);
32		if($pager.find('a').size()==0){
33			$pager.css({'display':'none'});
34		}
35		
36
37		onWindowScroll();
38		$window.on("scroll", onWindowScroll);
39		
40		onWindowResize();			
41		$window.on('load resize', onWindowResize);
42	
43		
44		setModule();
45		
46		function setModule(){
47		
48			var _window_w = $(window).width();
49			var _w,
50				_h
51				;
52			
53			if(_window_w < 980 && _window_w >= 690){
54				_w = 100+'%';
55			}else if(_window_w < 690){
56				_w = 100+'%';
57			}else{
58				_w = 705+'px';
59			}
60			
61			$module.css({'width':_w});
62			
63			if(_window_w < 690){
64				$module.find('a.anchor').css({'width':_w});
65				$module.find('a.anchor').css({'height':( $module.find('a.anchor').width()*2/3 ) + 'px'});
66			}else{
67				$module.find('a.anchor').css({'width':_w});
68			}
69			
70			if(_window_w < 980){
71				$archives.css({ 'height': 'auto'});
72			}else{
73				$archives.css({ 'height':$module.parent().css('height') });
74			}
75
76			
77			//date			
78			$('.date').each(function(i){
79			
80/* 				$(this).css({'top': $(this).parent().height()-$(this).height() +'px'}); */
81			
82			});
83		}
84		
85/* 		mouseActionModule(); */
86/* 		mouseActionArvhives(); */
87		if($(window).width() < 980){
88			mouseActionArvhives();
89		}else{
90/* 			removeActionArvhives(); */
91		}
92		
93		function mouseActionModule(){
94			$module.hover(mouseover_z,mouseout_z);
95			function mouseover_z(){
96				$('img.img',this).stop().animate({ 'width':110+'%'/* ,'height':_w*2/3*104/100+'px' */,'margin':'-2.5% 0 0 -5%' }, 400,"easeOutElastic");
97				$('h1.ttl',this).css({ 'text-decoration':'underline','color':'#FFF','background':'#000' });
98				$('.category',this).css({ 'opacity':1,'color':'#FF0' });
99			}
100			function mouseout_z(){
101				$('img.img',this).stop().animate({ 'width':100+'%'/* ,'height':_w*2/3+'px' */,'margin':'0' }, 200,"easeOutExpo");
102				$('h1.ttl',this).css({ 'text-decoration':'none','color':'#FFF','background':'transparent' });
103				$('.category',this).css({ 'opacity':.2,'color':'#FF0' });
104			}
105			
106		}
107		
108		function removeActionArvhives(){
109			$archives.unbind();
110		}
111		
112		function mouseActionArvhives(){
113			$archives.click(click_archives);
114			function click_archives(){
115			    if($('.toggle',this).css('display') == 'none') {
116			        $('.toggle',this).slideDown('slow');
117					$('.btn img',this).attr("src",$('.btn img',this).attr("src").replace("archives", "archives_close"));
118					$('.btn img',this).attr("srcset",$('.btn img',this).attr("srcset").replace("archives", "archives_close"));	
119			    }else{
120			        $('.toggle',this).slideUp('fast');
121					$('.btn img',this).attr("src",$('.btn img',this).attr("src").replace("archives_close", "archives"));
122					$('.btn img',this).attr("srcset",$('.btn img',this).attr("srcset").replace("archives_close", "archives"));
123			    }
124			}
125			
126		}
127		
128		function hide(options) {
129			$news.css({"visibility":"hidden",opacity:0});
130			$module.css({"visibility":"hidden",opacity:0});
131		}
132		
133		function show(options) {
134
135			$news.css({"visibility":""});		
136			window.setTimeout(function () {
137				$news.animate({
138					opacity: 1
139				}, 400,"easeInOutCubic");
140			}, 200);
141			
142			$(function(){
143				var url = $(location).attr('href');
144				if (url.indexOf("?id=") == -1) {
145				}else{
146					var url_sp = url.split("?id=");
147					var hash   = '#' + url_sp[url_sp.length - 1];
148					var tgt    = $(hash);
149					var pos    = tgt.offset().top - 110;
150					$("html, body").animate({scrollTop:pos}, 800, "easeInOutCirc");
151				}
152			});
153			
154			$module.each(function(i){
155				modules.push($(this));				
156				
157				$(this).css("visibility", "");
158				$(this).delay(Math.random()*500).animate({
159					opacity: 1
160				},400);
161				
162				
163				if (i !== currentItem) return;
164			});
165			
166/*
167			$('#cboxClose').each(function(){
168			        var txt = $(this).html();
169			        
170			        console.log(txt)
171			        $(this).html(txt.replace(/close/g,'<span></span><span></span>'));
172			});
173*/
174			
175
176		}		
177		
178		
179		function onWindowScroll(event) {	
180				
181		}
182		
183		function onWindowResize() {
184		
185			setModule();
186
187		}
188		
189		return $news;
190	}
191
192	return news;
193}(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.