PageSourceSearch

https://www.ishikawa-kappou-miyakawa.com/shared_blog/js/common.js

js ishikawa-kappou-miyakawa.com collected 2026-10-07 03:53:57 UTC 2,113 bytes, 77 lines download raw bytes

1/*!
2 * ScriptName: common.js
3 * Version: 1.6
4 *
5 * Project: FC-Blog
6 *
7 * FoodConnection
8 * http://foodconnection.jp/
9 * http://foodconnection.vn/
10 *
11 */
12
13$(document).ready(function() {
14	var UA = navigator.userAgent;
15	if (UA.indexOf("iPhone") < 0 && UA.indexOf("Android") < 0) $(".telhref").contents().unwrap(); // remove link [tel] on desktop
16
17	// BEGIN: rollover button
18	$("body").on({
19		mouseover: function() {
20			if (!$(this).data("src-original")) $(this).data("src-original", $(this).attr("src"));
21
22			$(this).attr("src").match(/^(.*)(\.{1}.*)/g);
23
24			var $src = RegExp.$1 + "_on" + RegExp.$2;
25
26			$(this).attr("src", $src); // update src
27		}, mouseout: function() {
28			if ($(this).data("src-original")) {
29				$(this).attr("src", $(this).data("src-original")); // update src
30				$(this).removeData("src-original")
31			}
32		}
33	}, "img.btn");
34	// END: rollover button
35
36	$(".toggle").click(function() {
37		$(this).parents("aside").toggleClass("active");
38	});
39
40	// sidebar
41	$("#sidebar h2").click(function() {
42		if ($(window).width() <= 768) {
43			if ($(this).parent().hasClass("active")) {
44				$(this).nextAll().stop().slideUp(300, function() {
45					$(this).removeAttr("style");
46					$(this).parent().removeClass("active");
47				});
48			} else {
49				$(this).nextAll().stop().slideDown(300, function() {
50					$(this).removeAttr("style");
51					$(this).parent().addClass("active");
52				});
53			}
54		}
55	});
56});
57
58
59
60// calendar
61var pathMonth = location.pathname ? location.pathname.split("/") : false,
62	paramMonth = false,
63	referrer = document.referrer.replace(/^https?:\/\//i, "").split("/")[0];
64
65if (referrer == location.hostname && pathMonth && pathMonth.constructor === Array && pathMonth.length > 0) {
66	paramMonth = pathMonth[pathMonth.length - 1];
67
68	if (!paramMonth || paramMonth.length < 1) paramMonth = pathMonth[pathMonth.length - 2]; // slash
69
70	if (!isNaN(parseFloat(paramMonth)) && isFinite(paramMonth)) {
71		if ($("#calendar").length > 0) {
72			$("#calendar").addClass("active"); // collapsed
73
74			if ($(window).width() <= 768 && $("#calendar").is(":visible")) window.scroll(0, $("#calendar").offset().top);
75		}
76	}
77}

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.