PageSourceSearch

https://www.brother-kenpo.jp/assets/js/main.js

js brother-kenpo.jp collected 2026-10-05 01:43:32 UTC 2,258 bytes, 88 lines download raw bytes

1import { BASE_PATH, IS_SMARTPHONE_CHECK } from "./consts/index.js";
2import { headerInclude, footerInclude } from "./libs/includeHtml.js";
3import { drawerMenu } from "./libs/drawerMenu.js";
4import { replaceImg } from "./libs/replaceImg.js";
5import { slideToggle } from "./libs/slideToggle.js";
6import { tabSwitch } from "./libs/tabSwitch.js";
7import { sideIncludeSwitch } from "./libs/sideInclude.js";
8import { swipeTable } from "./libs/swipeTable.js";
9import { topicsNew } from "./libs/topicsNew.js";
10import { etxAddQueryParam } from "./libs/etxAddQueryParam.js";
11import { addCssFilter } from "./libs/addCssFilter.js";
12
13console.log(BASE_PATH);
14
15/*============================
16オリジナル
17============================*/
18
19//初期処理
20async function init() {
21	await headerInclude(BASE_PATH);
22	await footerInclude(BASE_PATH);
23	await sideIncludeSwitch(BASE_PATH);
24}
25//初期処理が完了したら・・・
26init()
27	.then(() => {
28		addCssFilter(".js-cssFilter");
29		// トップページバナー
30		swiper(".banner");
31		topicsNew();
32		//メニュー
33		drawerMenu("#js-drawerMenu", [".h-sitemap"]);
34
35		swipeTable(".main-inner");
36
37		etxAddQueryParam();
38
39		if (IS_SMARTPHONE_CHECK) {
40			/* ============================
41			スマホのみ有効なfunction
42			============================*/
43			//画像置換
44			replaceImg();
45			//フッターのアコーディオンメニュー
46			slideToggle(".js-slideToggle");
47		} else {
48			/* ============================
49			PCのみ有効なfunction
50			============================*/
51			//トップページタブ切り替え
52			// tabSwitch(".js-tab");
53		}
54	})
55	.catch((e) => {
56		console.log("Error:", e);
57	});
58
59/*============================
60外部ライブラリ
61============================*/
62
63//Swiper
64function swiper(target) {
65	const $target = document.querySelector(target);
66	if (!$target) {
67		return;
68	} else {
69		new Swiper(target, {
70			loop: true,
71			spaceBetween: 28,
72			slidesPerView: 1,
73			navigation: {
74				nextEl: ".swiper-button-next",
75				prevEl: ".swiper-button-prev",
76			},
77			autoplay: {
78				delay: 5000,
79			},
80			breakpoints: {
81				// 768px以上の場合
82				768: {
83					slidesPerView: 3,
84				},
85			},
86		});
87	}
88}

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.