PageSourceSearch

https://www.town.namie.fukushima.jp/ssi/js/footstep.js?20230126

js town.namie.fukushima.jp collected 2026-10-02 03:57:20 UTC 5,523 bytes, 133 lines download raw bytes

1jQuery(document).ready(function($){
2	if(('sessionStorage' in window) && (window.sessionStorage !== null)) {
3
4		var pageTitle = $('h1').text(); // ページタイトル
5        if ($('.top_index')[0]) {
6            pageTitle = 'トップページ'; // トップページの場合
7        } else if ($('.front_index')[0]) {
8            pageTitle = 'フロントページ'; // フロントページの場合
9        } 
10        var pageUrl = location.href; // ページアドレス
11
12		// あしあとリスト
13		function  footstepList() {
14			var footstep_rireki_buf = ''; // 履歴一覧用
15
16			footstep_rireki_buf = JSON.parse(sessionStorage.getItem('footstep_rireki'));
17			if(footstep_rireki_buf === null){
18				footstep_rireki_buf = '';
19			}
20
21			// あしあとの親要素設置
22			if($('#pankuzu_wrap')[0]){
23				$('#pankuzu_wrap').append($('<div id="footstep_wrap" />'));
24			}else{
25				$('#mymainback').prepend($('<div id="footstep_wrap" />'));
26			}
27			$('#footstep_wrap').append('<div id="footstep"><div id="footstep_ttl">足あと</div><div id="footstep_detail"></div></div>');
28			// 今までのあしあとの展開
29			$('#footstep_detail').append(footstep_rireki_buf);
30			if($('#footstep_detail span:last-child a').attr('href') != pageUrl){
31				$('#footstep_detail').append('<span class="fs_rireki"><a href="' + pageUrl + '">' + pageTitle + '</a></span>');
32			}
33
34			// 末尾(現在のページ)はリンクさせない
35			$('#footstep_detail span:last-child a').on('click keypress',function(){
36				return false;
37			});
38			// あしあとクリア
39			$('#footstep').append('<button type="button" value="削除" id="clear_footstep">削除</button>');
40			$('#clear_footstep').on('click',function(){
41				$('#footstep_detail').html('');
42				footstep_rireki_buf = $('#footstep_detail').html();
43				sessionStorage.setItem('footstep_rireki',JSON.stringify(footstep_rireki_buf));
44				$(this).hide();
45				$('#footstep_ttl').hide();
46			});
47
48			// 最大10件の履歴を保持
49			if($('#footstep_detail > span').length > 10){
50				$('#footstep_detail > span:first-child').remove();
51			}
52
53			footstep_rireki_buf = $('#footstep_detail').html();
54			if(footstep_rireki_buf === undefined){footstep_rireki_buf = ''}
55			sessionStorage.setItem('footstep_rireki',JSON.stringify(footstep_rireki_buf));
56		}
57
58
59		// 最後に見たページを表示
60		function lastViewPage(){
61			var fs_lastItemHtml = $('#footstep span:last-child').html();
62			var fs_lastItemLS = JSON.parse(localStorage.getItem('footstep_lasturi'));
63			if(fs_lastItemLS === null){
64				fs_lastItemLS = '';
65			}
66
67			$('#header_nav2').prepend('<div id="link_lastviewpage" />');
68			$('#link_lastviewpage').prepend(fs_lastItemLS);
69
70			localStorage.setItem('footstep_lasturi',JSON.stringify(fs_lastItemHtml));
71		}
72
73
74		// ページ記憶:削除ボタンイベント割当
75		function kTPsetDelButton(ktp_buf){
76				$('#ktp_item_list .ktp_item_del').on('click keypress',function(){
77					$(this).closest('.ktp_item').remove();
78					ktp_buf = $('#ktp_item_list').html();
79					localStorage.setItem('keep_page_uri',JSON.stringify(ktp_buf));
80				});
81				return ktp_buf;
82		}
83		// ページ記憶
84		function keepThisPage() {
85			$('#container').after('<div id="keep_page"><div id="ktp_list_wrap"><div id="ktp_list_wrap2"><button type="button" id="ktp_save" class="btn_func"><span>このページを一時保存する</span></button><button type="button" id="ktp_del_all" class="btn_func"><span>保存したページをすべて削除する</span></button><ul id="ktp_item_list"></ul></div></div></div>');
86			$('#ktp_list_wrap').hide();
87			var ktp_buf = JSON.parse(localStorage.getItem('keep_page_uri'));
88			if(ktp_buf === null || ktp_buf === undefined){
89				ktp_buf = '';
90			}
91			$('#ktp_item_list').html(ktp_buf);
92			$('#keep_page').prepend('<div id="kpt_viewsw_wrap"><a href="javascript:void(0)" onclick="javascript:return false;" onkeypress="javascript:return false;" id="ktp_viewsw"><span>このページを一時保存する</span></a></div>');
93
94			// var ktp_area_width = $('#keep_page').width();
95			// $('#keep_page').css('right','-'+ktp_area_width+'px');
96
97			ktp_buf = kTPsetDelButton(ktp_buf)
98			$('#ktp_save').on('click keypress',function(){
99				// $('#keep_page').css('right','0px');
100				if($('#ktp_item_list li:first-child a').attr('href') != pageUrl){
101					$('#ktp_item_list').prepend('<li class="ktp_item"><a href="'+pageUrl+'">'+pageTitle+'</a><button type="button" value="削除" class="ktp_item_del">削除</button></li>');
102					ktp_buf = $('#ktp_item_list').html();
103					localStorage.setItem('keep_page_uri',JSON.stringify(ktp_buf));
104					// ktp_area_width = $('#keep_page').width();
105					// $('#keep_page').css('right','-'+ktp_area_width+'px');
106					ktp_buf = kTPsetDelButton(ktp_buf)
107				}
108			});
109			$('#ktp_del_all').on('click keypress',function(){
110				$('#ktp_item_list').empty();
111					ktp_buf = $('#ktp_item_list').html();
112					localStorage.setItem('keep_page_uri',JSON.stringify(ktp_buf));
113			});
114
115			$('#ktp_viewsw,#ktp_list_wrap').on('click keypress',function(event){
116				event.stopPropagation();
117			})
118			$('#ktp_viewsw').on('click keypress',function(){
119				$(this).toggleClass('open');
120				$('#ktp_list_wrap').toggle();
121			});
122			$(document).on('click keypress',function(){
123				$('#ktp_viewsw').removeClass('open');
124				$('#ktp_list_wrap').hide();
125			});
126		}
127
128		//keepThisPage();
129		footstepList();
130		// lastViewPage();
131
132	}
133});

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.