PageSourceSearch

http://www.balkan.hu/ext/tool-man/cookies.js

js balkan.hu collected 2026-10-02 22:23:18 UTC 879 bytes, 34 lines download raw bytes

1/* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt)
2
3based on http://www.quirksmode.org/js/cookies.html
4*/
5
6ToolMan._cookieOven = {
7
8	set : function(name, value, expirationInDays) {
9		if (expirationInDays) {
10			var date = new Date()
11			date.setTime(date.getTime() + (expirationInDays * 24 * 60 * 60 * 1000))
12			var expires = "; expires=" + date.toGMTString()
13		} else {
14			var expires = ""
15		}
16		document.cookie = name + "=" + value + expires + "; path=/"
17	},
18
19	get : function(name) {
20		var namePattern = name + "="
21		var cookies = document.cookie.split(';')
22		for(var i = 0, n = cookies.length; i < n; i++) {
23			var c = cookies[i]
24			while (c.charAt(0) == ' ') c = c.substring(1, c.length)
25			if (c.indexOf(namePattern) == 0)
26				return c.substring(namePattern.length, c.length)
27		}
28		return null
29	},
30
31	eraseCookie : function(name) {
32		createCookie(name, "", -1)
33	}
34}

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.