PageSourceSearch

https://agefree-service.net/jobfind-pc/original/css/option/new_map/addin_newmap.js

js agefree-service.net collected 2026-10-04 12:35:49 UTC 4,585 bytes, 116 lines download raw bytes

1/*==============================================================================================
2【addin_newmap.js】テキストマップ化&アコーディオンマップ化js
3 2017/10/17:ver1.03 font-size:0;でinline-block隙間対応
4 2018/06/01:ver1.04 ブレークポイント値修正・地図フォント適用範囲修正
5 2018/09/10:ver1.05 ブランドサイト対応
6 2019/01/10:ver1.06 jQuery1.3.2対応により掛け合わせ検索との併用可
7 2019/01/30:ver1.07 修正
8 2019/02/13:ver1.08 hover修正
9 2019/03/14:ver2.00 document.write方式を廃止
10 2021/07/28:ver3.00 jquery3対応、フリーワード検索&ロケスマ設置
11 2021/07/28:ver3.01 デバッグ or ローカルコード使用時の点滅頻度を遅くする
12 2021/08/23:ver3.02 data-mapjs属性をtrueデフォルト化
13 2021/11/20:ver3.10 LP擬似トップ対応、パラメータ付与対応 
14 2023/01/14:ver3.12 バグフィックス:ブランドサイトに使用可能にする
15================================================================================================*/
16var
17$pURL=location.pathname,
18$myself_map = document.getElementById("js_smartMap"),
19$bln_classic=Boolean($myself_map.getAttribute("data-classic")),
20$bln_mapjs=Boolean($myself_map.getAttribute("data-mapjs")),
21$use_jquery3 = Boolean($myself_map.getAttribute("data-jquery3") === "true"),
22$chk_testcode = Boolean(document.getElementById("mapObj2").getAttribute("data-testcode") ==="true"),
23$debug=Boolean($myself_map.getAttribute("data-debug")==="true"),
24$lpmode = Boolean($myself_map.getAttribute("data-lpmode"));
25
26var theFirstChild = $myself_map.nextElementSibling;
27
28//=================================
29//◆設置処理&URL識別
30//=================================
31//インポート関数生成
32function addinCSS(css) {
33			var html = document.createElement("link");
34			html.rel = "stylesheet";
35			html.href = css;
36			$myself_map.parentNode.insertBefore(html,theFirstChild);
37}
38function addinJS(js) {
39			var html = document.createElement("script");
40			html.type = "text/javascript";
41			html.src = js;
42			html.async = "true";
43			$myself_map.parentNode.insertBefore(html,theFirstChild);
44}
45//=================================
46//◆インポート処理
47//=================================
48//URL判定
49var $bln = (
50	$pURL==="/jobfind-pc/" || 
51	$pURL==="/brand-jobfind/" || 
52	$pURL==="/jobfind-pc-preview2-responsive/" || 
53	$pURL==="/jobfind-pc-preview2/");
54
55if($bln || $debug || $lpmode){
56	var
57	$url_maps ="",
58	$mapURL = "",
59	$src = $myself_map.getAttribute("src"),
60	$split= $src.split("/");
61	for(var i=0;i<$split.length-1;i++){
62		$url_maps+=$split[i]+"/";
63	}
64	var $source_map = $url_maps;
65	
66	/*ブランドサイトの場合はjQuery1のみにする、かつareamapper.jsにする*/
67	if($pURL.match("/brand-jobfind/")){
68		$use_jquery3=false;
69		if($bln_mapjs){
70			addinJS("/brand-jobfind/js/areamapper.js");
71		}
72	}else{
73	/*通常サイトの場合*/
74		if($bln){
75			$mapURL = "/jobfind-pc/";
76		}
77		else{
78			$mapURL = "jobfind-pc/";
79		}
80		if($bln_mapjs){
81			addinJS($mapURL+"js/map.js");
82		}
83	}
84	
85	
86	
87	//テストコード判定
88	if($bln && $chk_testcode){
89		document.getElementById("mapObj2").classList.add("error_mode");
90		if($debug){
91			alert("警告!\nローカル環境用コードが使用されています!\nデバッグモードも使用中です!\n直ちに本番環境用コードに書き換えたのちに、data-debug=falseにしてください!");
92			document.getElementById("mapObj2").classList.add("doublemode");
93		}else{
94			alert("警告!現在地図にローカル環境用コードが入っています!\n直ちに本番環境用コードに書き換えてください!");
95			document.getElementById("mapObj2").classList.add("testmode");
96		}
97	}else if($bln && $debug){
98		alert("警告!現在地図にデバッグモードを使用中です!\n data-debug=falseにしてください!");
99		document.getElementById("mapObj2").classList.add("error_mode");
100		document.getElementById("mapObj2").classList.add("debugmode");
101	}
102	addinCSS($source_map+'noEdit/map_module_noEdit.css');
103	addinCSS($source_map+'map_setting.css');
104	//LP擬似トップ判定
105	if($lpmode){
106		addinJS($source_map+'noEdit/map_module_ajax.js');
107		addinCSS($source_map+'noEdit/map_module_lpmap.css');
108	}else{
109	//通常トップ
110		if($use_jquery3) {
111			addinJS($source_map+'noEdit/map_module_noEdit_jquery3.js');
112		}else{
113			addinJS($source_map+'noEdit/map_module_noEdit_jquery1.js');
114		}
115	}
116}

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.