PageSourceSearch

https://kishidan.com/style/js/infocommon.js

js kishidan.com collected 2026-10-02 06:57:59 UTC 2,552 bytes, 82 lines download raw bytes

1var MAIN = MAIN || {},$window;
2
3//Detect SmartPhone
4(function () {
5	var is_iphone=navigator.userAgent.indexOf("iPhone", 0);
6	var is_ipod=navigator.userAgent.indexOf("iPod", 0);
7	var is_android=navigator.userAgent.indexOf("Android", 0);
8	var url = window.location.pathname.toString().replace('/','/sp/');
9	if((is_iphone & is_ipod) > -1){          
10		window.location.pathname = url;
11	}else{}
12	if(is_android > -1){
13		window.location.pathname = url;
14	}else{}
15})();
16
17//謾ケ陦後さ繝シ繝牙、画鋤
18var nl2br = function(str){
19	return str.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br>$2');
20}
21
22//驥鷹。阪き繝ウ繝槭そ繝代Ξ繝シ繝�
23function separatePrice(num){
24    return String(num).replace( /(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
25}
26
27//Base
28$(document).ready(function () {
29	//MAIN
30     MAIN = function () {        
31        this.$scrollTarget = (function () {
32            var html = $('html'), top = html.scrollTop(),
33                elm = $('<div/>').height(10000).prependTo('body'),
34                rs = null;
35            html.scrollTop(10000);
36            rs = !!html.scrollTop();
37            html.scrollTop(top);
38            elm.remove();
39            return $(rs ? 'html' : 'body');
40        })();
41    };
42
43    MAIN.prototype.scrollToTarget = function (target, ease, dur) {
44        var easing = (ease === undefined) ? 'easeOutQuart' : ease,
45            duration = (dur === undefined) ? 1000 : dur,
46            $target = target,
47            pos = $target.offset().top - 150;
48
49            this.$scrollTarget.animate({scrollTop: pos}, duration, easing, function () {
50              var url = location.protocol + '//' + location.hostname + location.pathname;
51              history.pushState(null, null, url+"#"+$target.attr('id'));
52            });
53    };
54    
55    MAIN.prototype.getJSON = function (url, callback) {
56		$.ajax({
57	    	"timeout": 10000,
58			type: 'GET',
59			url: url,
60			dataType: 'jsonp',
61			jsonpCallback: 'callback',
62			success: callback
63		});
64	}
65	
66	//Init
67    function init() {
68        $window = $(window);
69        MAIN = new MAIN();
70        $(document).on('click', 'a[href^="#"]', function (e) {
71            e.preventDefault();
72            MAIN.scrollToTarget($($(this).attr('href')), 'easeOutQuart', 500);
73        });
74        
75		$('img.hover').hover(function () {
76			$(this).attr('src', $(this).attr('src').replace('.', '_on.'));
77		},function () {
78			$(this).attr('src', $(this).attr('src').replace('_on.', '.'));
79		});
80    }
81    init();
82});

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.