PageSourceSearch

https://doosungpaper.co.kr/data/skin/mobile/moment/js/lib/storage.js?ts=1578277205

js doosungpaper.co.kr collected 2026-10-05 22:01:05 UTC 2,149 bytes, 70 lines download raw bytes

1var storage = {
2	// iOS 사파리내 개인정보보호(시크릿) 모드에서 로컬스토리지 에러 발생해서 해당 부분 예외 처리
3	isLocalStorageNameSupported: function () {
4		var localStorageName = 'localStorage',
5			testKey = 'test',
6			storage = window.sessionStorage;
7		try {
8			storage.setItem(testKey, '1');
9			storage.removeItem(testKey);
10			return localStorageName in window && window[localStorageName];
11		}
12		catch (error) {
13			return false;
14		}
15	},
16	saveSession: function(control_key, control_value) {
17		if (!this.isLocalStorageNameSupported()) {
18			gd_create_cookie(control_key, control_value, 7);
19		} else {
20			window.sessionStorage[control_key] = control_value;
21		}
22	},
23	loadSession: function(control_key) {
24		var control_value;
25		if (!this.isLocalStorageNameSupported()) {
26			control_value = gd_read_cookie(control_key);
27		} else {
28			control_value = sessionStorage[control_key];
29		}
30		return control_value;
31	},
32	saveVal: function(control_key, control_value) {
33		if (!this.isLocalStorageNameSupported()) {
34			this.createCookie(control_key, control_value, 7);
35		} else {
36			window.localStorage.setItem(control_key, control_value);
37		}
38	},
39	loadVal: function(control_key) {
40		var control_value;
41		if (!this.isLocalStorageNameSupported()) {
42			control_value = this.readCookie(control_key);
43		} else {
44			control_value = localStorage.getItem(control_key);
45		}
46		return control_value;
47	},
48	createCookie: function(name, value, days) {
49		if (days) {
50			var date = new Date();
51			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
52			var expires = "; expires=" + date.toGMTString();
53		} else
54			var expires = "";
55		document.cookie = name + "=" + value  + "; path=/; expires=" + expires + ";";
56	},
57	readCookie: function(name) {
58		var result = "";
59		var nameEQ = name + "=";
60		var ca = document.cookie.split(';');
61		for (var i = 0; i < ca.length; i++) {
62			var c = ca[i];
63			while (c.charAt(0) == ' ') c = c.substring(1, c.length);
64			if (c.indexOf(nameEQ) == 0) {
65				result = c.substring(nameEQ.length, c.length);
66			}
67		}
68		return result;
69	}
70};

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.