PageSourceSearch

https://www.nishikofu.co.jp/lp/locaop.js

js nishikofu.co.jp collected 2026-10-08 02:40:44 UTC 1,219 bytes, 29 lines download raw bytes

1(function() {
2	// 現在のURLから _src パラメータを取得する関数
3	function getsrcSource() {
4		const params = new URLSearchParams(window.location.search);
5		return params.get('_src'); // _srcパラメータを取得
6	}
7	// すべてのリンクに _src パラメータを追加する関数
8	function addUtmToAllLinks(utmValue) {
9		if (!utmValue) return; // _src が存在しない場合は何もしない
10		const links = document.querySelectorAll('a[href]'); // すべてのリンクを取得
11		links.forEach(link => {
12			try {
13				const linkURL = new URL(link.href, window.location.origin);
14				// console.log(linkURL);
15
16				// _srcパラメータが既に存在しない場合のみ追加
17				if (!linkURL.searchParams.has('_src') && linkURL.origin != 'null') { // linkURL.protocol.indexOf('http') でも可
18					linkURL.searchParams.set('_src', utmValue); // _srcを追加
19					link.href = linkURL.toString(); // リンクURLを更新
20				}
21			} catch (e) {
22				console.warn("無効なURL:", link.href);
23			}
24		});
25	}
26	// 実行
27	const utmValue = getsrcSource(); // 現在のURLから_srcパラメータを取得
28	addUtmToAllLinks(utmValue); // すべてのリンクに_srcパラメータを追加
29})();

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.