PageSourceSearch

https://swmclub.com/wp-content/themes/surfing/js/original.js?ver=1.20.0

js swmclub.com collected 2026-10-09 22:23:25 UTC 7,614 bytes, 293 lines download raw bytes

1var sp = checkSP();
2
3$(window).on("orientationchange load resize",function(){
4	sp = checkSP();
5/*
6	var scrollTag = ( window.chrome || 'WebkitAppearance' in document.documentElement.style )? 'body' : 'html';
7	$("#pagetop").click(function(){
8		//$("html,body").animate({scrollTop:0}, 1000, 'easeOutQuint');
9		$(scrollTag).animate({scrollTop:0}, 500, 'linear');
10		return false;
11	});
12*/
13});
14
15//follow contents
16$(window).load(function(){
17    if(!sp){
18      	$(".follow").sticky({ topSpacing: 180, parent:".side_contents"});
19	}
20});
21
22/*
23//header
24$(window).scroll(function(){
25	scr = $(this).scrollTop();
26	if(scr > 160){
27		$("#header_wrapper").stop().animate({"top" : "0px"},"150", 'easeOutQuint').addClass("slim");
28		$("#sb-site").addClass("sb-site-slim");
29	}else{
30		$("#header_wrapper").stop().css({"top" : "-" + scr + "px"}).removeClass("slim");
31		$("#sb-site").removeClass("sb-site-slim");
32	}
33});
34*/
35
36//fix_area
37var timer = false ;
38$(window).on("scroll touchmove", function(){
39	scr = $(this).scrollTop() > 500;
40	if(scr){
41		//$("#fix_area").addClass("show");
42
43		if(timer !== false){
44			clearTimeout(timer);
45		}
46		$("#fix_area").stop();
47		$("#fix_area").animate({'bottom' : '-200px'}, 0, 'easeOutQuint'); 
48		timer = setTimeout(function() {                 
49			$("#fix_area").stop() ;
50			$("#fix_area").animate({'bottom' : '0px'}, 0, 'easeOutQuint'); 
51		}, 1000) ;   
52	} else {
53		//$("#fix_area").removeClass("show");
54
55		$("#fix_area").stop();
56		$("#fix_area").animate({'bottom' : '-200px'}, 0, 'easeOutQuint'); 
57	}
58});
59
60//click event
61$(function(){
62	//category_menu
63    $(".category_menu dt").on("click", function() {
64        $(this).next().slideToggle();
65        $(this).toggleClass("active");
66    });
67    //switch_display
68    $(".switch_display .st_list").on("click", function() {
69        $("#cassette_container").addClass("style_list");
70        $("#cassette_container").removeClass("style_tile");
71    });
72    $(".switch_display .st_tile").on("click", function() {
73        //$("#cassette_container").toggleClass("style_tile");
74        $("#cassette_container").addClass("style_tile");
75        $("#cassette_container").removeClass("style_list");
76    });
77    //link area
78	$('.cassette').click(function() {
79	location.href = $(this).find('a').attr('href');
80		return false;
81	});
82	$('.cassette .category').click(function() {
83	location.href = $(this).find('a').attr('href');
84		return false;
85	});
86	$('.cassette .author').click(function() {
87	location.href = $(this).find('a').attr('href');
88		return false;
89	});
90	$('.linkarea').click(function() {
91	location.href = $(this).find('a').attr('href');
92		return false;
93	});
94    //side tab
95    $(".tab li").click(function() {
96        var num = $(".tab li").index(this);
97        $(".tab_contents .list").addClass('hide');
98        $(".tab_contents .list").eq(num).removeClass('hide');
99        $(".tab li").removeClass('active');
100        $(this).addClass('active')
101    });
102    //maincontents tab
103    $(".tab_l li").click(function() {
104        var num = $(".tab_l li").index(this);
105        $(".tab_contents .list_l").addClass('hide');
106        $(".tab_contents .list_l").eq(num).removeClass('hide');
107        $(".tab_l li").removeClass('active');
108        $(this).addClass('active')
109    });
110	//fix_content
111	$('#fix_area .close').click(function() {
112		$("#footer_fix").addClass("hide");
113		return false;
114    });
115});
116
117// slidebars
118(function($) {
119	$(document).ready(function() {
120		if (sp) {
121			$.slidebars();
122		}
123	});
124}) (jQuery);
125
126function checkSP(){
127	var sp;
128	if(navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0 && navigator.userAgent.indexOf('Mobile') > 0){
129		if($(window).width() <= 768){
130			sp = 1;
131			$(document).ready(function() {
132    		});
133		}else{
134			sp = 0;
135		}
136	}
137	if(navigator.userAgent.indexOf('iPad') > 0 || navigator.userAgent.indexOf('Android') > 0){
138		if($(window).width() <= 768){
139			sp = 1;
140		}
141	}
142	return sp;
143}
144
145function get_social_count_facebook(url, counterId) {
146	jQuery.ajax({
147		async: true,
148		url:'https://graph.facebook.com/',
149		dataType:'jsonp',
150		data:{
151			id:url
152		},
153		success:function(res){
154			jQuery('.' + counterId + ' .count').text( res.share.share_count || 0 );
155/*
156			if (res && res.share && res.share.share_count) {
157				jQuery('.' + counterId + ' .count').text( res.share.share_count || 0 );
158			} else {
159				jQuery('.' + counterId + ' .count').text( 0 );
160			}
161*/
162		},
163		error:function(){
164			jQuery('.' + counterId + ' .count').text('?');
165		}
166	});
167}
168
169function get_social_count_hatena(url, counterId) {
170	var hatebu_url = ("https:" == document.location.protocol) ? "//b.hatena.ne.jp/entry.count" : "//api.b.st-hatena.com/entry.count";
171	jQuery.ajax({
172		async: true,
173		url:hatebu_url,
174		dataType:'jsonp',
175		data:{
176			url:url
177		},
178		success:function(res){
179			jQuery('.' + counterId + ' .count').text( res );
180		},
181		error:function(){
182			jQuery('.' + counterId + ' .count').text('?');
183		}
184	});
185}
186
187/*--------------------------------------------------------------------------*
188 *  
189 *  SmoothScroll JavaScript Library V2
190 *  
191 *  MIT-style license. 
192 *  
193 *  2007-2011 Kazuma Nishihata 
194 *  http://www.to-r.net
195 *  
196 *--------------------------------------------------------------------------*/
197 
198new function(){
199
200	var attr ="data-tor-smoothScroll";//for html5 , if you can't use html5 , this value change "class"
201	var attrPatt = /noSmooth/;
202	var d = document;//document short cut
203	
204	/*
205	 *add Event
206	  -------------------------------------------------*/
207	function addEvent(elm,listener,fn){
208		try{ // IE
209			elm.addEventListener(listener,fn,false);
210		}catch(e){
211			elm.attachEvent(
212				"on"+listener
213				,function(){
214					fn.apply(elm,arguments)
215				}
216			);
217		}
218	}
219
220	/*
221	 *Start SmoothScroll
222	  -------------------------------------------------*/
223	function SmoothScroll(a){
224		if(d.getElementById(a.rel.replace(/.*\#/,""))){
225			var e = d.getElementById(a.rel.replace(/.*\#/,""));
226		}else{
227			return;
228		}
229		
230		//Move point
231		var end=e.offsetTop
232		var docHeight = d.documentElement.scrollHeight;
233		var winHeight = window.innerHeight || d.documentElement.clientHeight
234		if(docHeight-winHeight<end){
235			var end = docHeight-winHeight;
236		}
237		
238		//Current Point
239		var start=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop || 0;
240		
241		
242		var flag=(end<start)?"up":"down";
243
244		function scrollMe(start,end,flag) {
245			setTimeout(
246				function(){
247					if(flag=="up" && start >= end){
248						start=start-(start-end)/20-1;
249						window.scrollTo(0,start)
250						scrollMe(start,end,flag);
251					}else if(flag=="down" && start <= end){
252						start=start+(end-start)/20+1;
253						window.scrollTo(0,start)
254						scrollMe(start,end,flag);
255					}else{
256						scrollTo(0,end);
257					}
258					return ;
259				}
260				,10
261			);
262			
263		}
264
265		scrollMe(start,end,flag);
266		
267	}
268
269	/*
270	 *Add SmoothScroll
271	  -------------------------------------------------*/
272	addEvent(window,"load",function(){
273		/*
274		var anchors = d.getElementsByTagName("a");
275		for(var i = 0 ,len=anchors.length; i<len ; i++){
276			if(!attrPatt.test(anchors[i].getAttribute(attr)) && 
277				anchors[i].href.replace(/\#[a-zA-Z0-9_]+/,"") == location.href.replace(/\#[a-zA-Z0-9_]+/,"")){
278				anchors[i].rel = anchors[i].href;
279				anchors[i].href = "javascript:void(0)";
280				anchors[i].onclick=function(){SmoothScroll(this)}
281			}
282		}
283		*/
284		var anchor = d.getElementById("go_to_top");
285		if(!attrPatt.test(anchor.getAttribute(attr)) && 
286			anchor.href.replace(/\#[a-zA-Z0-9_]+/,"") == location.href.replace(/\#[a-zA-Z0-9_]+/,"")){
287			anchor.rel = anchor.href;
288			anchor.href = "javascript:void(0)";
289			anchor.onclick=function(){SmoothScroll(this)}
290		}
291	});
292
293}

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.