PageSourceSearch

https://www.boatrace-toda.jp/assets/js/common.js

js boatrace-toda.jp collected 2026-10-02 11:14:56 UTC 2,011 bytes, 65 lines download raw bytes

1// ファイルパス
2let headerFilePath = "/include/_header.html";
3let headerFilePath2 = "/include/_header2.html";
4let footerFilePath = "/include/_footer.html";
5let footerFilePath2 = "/include/_footer2.html";
6let error404FilePath = "error/404.html";
7let bannerFilePath = "/xml/banner.xml"
8let bannerFilePath2 = "/xml/banner.xml"
9
10// 全画面共通jsロード処理
11$(function() {
12    // ヘッダとフッターの読み込み
13    if (is_file(headerFilePath)) {
14        $("#header").load(headerFilePath, function(response, status, xhr) {
15        getXmlSystemSp();
16          init_nav_ctl();
17        });
18        
19    } else {
20        // local環境用 本番環境では通らない 1階層潜ってるHTMLファイルの場合参照
21        $("#header").load("../" + headerFilePath2, function(response, status, xhr) {
22        getXmlSystemSp();
23          init_nav_ctl();
24        });
25        
26    }
27    if (is_file(footerFilePath)) {
28        $("#footer").load(footerFilePath, function(response, status, xhr) {
29            getXmlBanner(bannerFilePath);
30        });
31    } else {
32        // local環境用 本番環境では通らない 1階層潜ってるHTMLファイルの場合参照
33        $("#footer").load("../" + footerFilePath2, function(response, status, xhr) {
34            getXmlBanner(bannerFilePath2);
35        });
36    }
37});
38
39// 404ページへリダイレクトする
40function redirect404() {
41    // 404ページへリダイレクト
42
43    if (is_file(error404FilePath)) {
44        location.href=error404FilePath;
45    } else {
46        // local環境用 本番環境では通らない 1階層潜ってるHTMLファイルの場合参照
47        location.href="../" + error404FilePath;
48    }
49}
50
51// ファイル存在チェック
52function is_file(fp){
53	var flg=null;
54	$.ajax({
55		url: fp,
56		cache: false,
57		async: false
58	}).done(function(data) {
59		flg=true;
60	})
61	.fail(function(jqXHR, textStatus, errorThrown) {
62		flg=false;
63	});
64	return flg;
65}

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.