PageSourceSearch

https://daysurgery-kyoto.jp/wp-content/themes/grits_theme/js/grits.scroll.js?ver=6.9.5

js daysurgery-kyoto.jp collected 2026-10-09 00:45:25 UTC 1,403 bytes, 53 lines download raw bytes

1$(window).on('load',function(){
2	"use strict";
3	function scroll(destination, distance) {
4		if ($(window).width() > 768) {
5			$('html,body').animate({ scrollTop: destination.top - (distance - 0)}, 400);
6		}
7		else {
8			$('html,body').animate({ scrollTop: destination.top - (distance - 0)}, 400);
9		}
10	}
11	
12	// anchor inside page
13	$(function(){
14		$('a[href*=\\#]').on('click', function (event) {
15			if(this.pathname === window.location.pathname){
16				event.preventDefault();
17				var distance = $("header").innerHeight();
18				var href = $(this).attr("href").split("#");
19				var destination = (href[1] || false);
20				if (!destination) {
21					console.log('Empty Anchor link.');
22				}
23				else {
24					var target = ($("#"+destination).offset() || false);
25			
26					if(destination=="mainContent"){
27						distance = distance - 30;
28					}
29					if (target) {
30						scroll(target, distance);
31					}
32					else {
33						alert("Wrong anchor link.\nPlease check your href.");
34					}
35				}
36			}
37		});
38	});
39	
40	// anchor outside from the page
41    if (location.hash) {
42    	var hash = location.hash;
43		var distance = $("header").innerHeight();
44        var target = ($(hash).offset() || false);
45        if (target) {
46			scroll(target, distance);
47        }
48		else {
49			console.log("Cannot find element with id=" + '"'+hash+'"' + ".\nPlease check your href.");
50		}
51    }
52
53});

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.