PageSourceSearch

https://www.mag2.com/js/ref.js

js mag2.com collected 2026-09-24 08:38:44 UTC 1,499 bytes, 63 lines download raw bytes

1// LPサイト遷移元による集計を可能とするための処理
2
3jQuery(document).ready(
4	function() {
5		getLandingParam();
6	}
7);
8
9function getLandingParam() {
10
11    var vals = getUrlVars();
12    var val = vals["ref"];
13    var ymail_flg = 0;
14
15	if(typeof val !== 'undefined'){
16		var fm = jQuery('[type=hidden][name="reg"]');
17
18		if(typeof fm !== 'undefined') {
19			for( i = 0; i < fm.length; i++) {
20				var lpElement = document.createElement('input');
21				lpElement.type = 'hidden';
22				lpElement.className = 'hidden';
23				lpElement.name = 'ref';
24				lpElement.value = val;
25
26				fm[i].form.appendChild(lpElement);
27
28				// Yahoo!からの遷移の場合
29				if(val === 'ymail') {
30					ymail_flg = 1;
31				}
32			}
33		}
34	}
35
36	// Yahoo!からの遷移の場合、メッセージを表示する
37	if(ymail_flg === 1){
38		var item = jQuery('[id=msg_ymail_use_mailaddress]');
39		if(typeof item !== 'undefined'){
40			// display:noneで制御している箇所は、showする
41			if(item.css('display') === 'none'){
42				item.show();
43			// display:noneで制御していない箇所はメッセージを埋め込む
44			}else{
45				item.html('※ Yahoo!メールのメールアドレスの登録を推奨します。');
46			}
47		}
48	}
49
50}
51
52function getUrlVars()
53{
54	var vars = [], hash;
55	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
56	for(var i = 0; i < hashes.length; i++)
57	{
58		hash = hashes[i].split('=');
59		vars.push(hash[0]);
60		vars[hash[0]] = hash[1];
61	}
62	return vars;
63}

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.