PageSourceSearch

https://tsuge-tts.com/wp/wp-content/themes/tsuge-tts/js/custom.js

js tsuge-tts.com collected 2026-10-03 18:38:25 UTC 1,990 bytes, 71 lines download raw bytes

1$(document).ready( function() {
2 	var ViewPort = {
3 		width: 'device-width',
4 		initialScale: '1.0',
5 		minimumScale: '0.25',
6 		maximumScale: '1.6',
7
8                //こちらの設定はご自由に
9 		modes : {
10 			sp: {
11 				width:'device-width',
12 				initialScale: '1.0',
13 				minimumScale: '0.25',
14 				maximumScale: '1.6'
15 			},
16 			pc: {
17 				width: '1100',
18 				initialScale: '0.30',
19 				minimumScale: '0.25',
20 				maximumScale: '1.0'
21 			}
22 		},
23 		currentMode : 'sp',
24
25                //ページ読込み時に実行 Cookieから設定を読み出す
26 		init: function () {
27 		    if ($.cookie('viewport-mode')) {
28 		    var modeName = $.cookie("viewport-mode");
29 			    this.changeMode(modeName);
30                    }
31 		},
32
33                //スマホ向けとPC向けを切り替え
34 		changeMode: function(modeName){
35 			var mode = this.modes[modeName];
36 			$.cookie('viewport-mode', modeName); //Cookieに値を設定
37 			this.width = mode.width;
38 			this.initialScale = mode.initialScale;
39 			this.minimumScale = mode.minimumScale;
40 			this.maximumScale = mode.maximumScale;
41 			this.currentMode = modeName;
42 			this.applyMetaTag();
43 		},
44
45                //現在の設定でmetaタグを差し替える
46 		applyMetaTag: function (){
47var content = 'width=' + this.width + ', initial-scale=' + this.initialScale + ', minimum-scale=' + this.minimumScale + ', maximum-scale=' + this.maximumScale;
48 			$('meta[name=viewport]').attr('content', content);
49 		},
50 	};
51
52 	ViewPort.init();
53
54 	$('#pc-site-change-button').on('click', '', function(){
55		
56		$.removeCookie('viewport-mode');
57 		$.cookie('viewport-mode',null);
58		$.cookie('viewport-mode', '', { expires: -1 });
59 		ViewPort.changeMode('pc');
60 	});
61
62 	$('#sp-site-change-button').on('click', '', function(){
63		$.removeCookie('viewport-mode');
64 		$.cookie('viewport-mode',null);
65		$.cookie('viewport-mode', '', { expires: -1 });
66 		ViewPort.changeMode('sp');
67        location.reload();
68        return false;
69 	});
70
71});

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.