PageSourceSearch

https://alpenrouten.de/lib/js/stdlib.js

js alpenrouten.de collected 2026-10-02 13:15:39 UTC 6,355 bytes, 172 lines download raw bytes

1if (top.location != self.location) {
2	top.location.href = document.location.href;
3}
4
5window.cookieconsent_options = {
6	message: 'alpenrouten.de verwenden Cookies, um Inhalte zu personalisieren und Sitzungsdaten zu verwalten. Dabei werden keine Informationen über die Nutzung von alpenrouten.de an Dritte weitergegeben. Einzelheiten findest Du in der <a href="/privacy.html" style="display:inline">Datenschutzerklärung</a>',
7	dismiss: 'Ok',
8	learnMore: 'Mehr erfahren',
9	link: '/privacy.html',
10	theme: false,
11	container: '#header',
12	markup: [
13		'<div class="cookie-consent">',
14		'',
15		'{{options.message}}<br/><br/><a data-cc-if="options.link" target="{{ options.target }}" class="cc_more_info left-button" href="{{options.link || "#null"}}">{{options.learnMore}}</a>',
16		'<a href="#null" data-cc-event="click:dismiss" target="_blank" class="cc_btn cc_btn_accept_all right-button">{{options.dismiss}}</a>',
17		'',
18		'</div>'
19	]
20}
21
22
23var query = new Object;
24var param_array = location.search ? location.search.substring(1).split('&') : Array();
25var hashlabel = location.hash;
26
27if (param_array.length > 0) {
28	for (var i = 0; i < param_array.length; i++) {
29		p = param_array[i].split('=');
30		query[p[0]] = unescape(p[1]);
31	}
32}
33$(document).ready( function() {
34	var	options = {
35		serviceUrl: 'ac_search.php',
36		minChars: 2,
37		delimiter: /(,|;)\s*/, // regex or character
38		maxHeight: 400,
39		width: 500,
40		zIndex: 9999,
41		deferRequestBy: 300, //milliseconds
42		params: { }, // additional parameters
43		noCache: true, //default is false, set to true to disable caching
44		autoSubmit: true,
45		// callback function:
46		onSelect: function(value,data) {
47			$('#qsearch').val(data.id);
48		}
49	};
50	ac = $('#qsearch').autocomplete(options);
51});
52
53
54
55function callLocation (url) {
56	var querystring = '';
57	for (var p in query) {
58		if (String (query[p]) != '') querystring += '&' + p + '=' + escape(String (query[p]));
59	}
60	document.getElementById('msgwait').style.visibility = 'visible';
61	if (url) {
62		self.location = url + '?' + querystring.substring(1) + hashlabel;
63	} else {
64		with (self.location) {
65			href = protocol + '//' + hostname + pathname + '?' + querystring.substring(1) + hashlabel;
66		}
67	}
68}
69
70// Cookies
71var acceptsCookies = false;
72if (document.cookie == '') {
73    document.cookie = 'acceptsCookies=1';
74    if(document.cookie.indexOf('acceptsCookies=1') != -1) acceptsCookies = true; 
75} else acceptsCookies = true;
76
77function setCookie (name, value, hours, path, domain, secure) {
78    if (acceptsCookies) {
79		if (hours) { // NN2 cannot handle Dates, so skip this part
80		    if ((typeof(hours) == 'string') && Date.parse(hours)) {
81				var numHours = hours;
82		    } else if (typeof(hours) == 'number') {
83				var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();
84		    }
85		}
86		document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':'');
87    }
88}
89
90function getCookie(name) {
91    if (document.cookie == '') {
92		return false;
93    } else {
94		var firstChar, lastChar;
95		var theBigCookie = document.cookie;
96		firstChar = theBigCookie.indexOf(name);
97		var NN2Hack = firstChar + name.length;
98		if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) {
99		    firstChar += name.length + 1; // skip 'name' and '='
100		    lastChar = theBigCookie.indexOf(';', firstChar);
101		    if(lastChar == -1) lastChar = theBigCookie.length;
102		    return unescape(theBigCookie.substring(firstChar, lastChar));
103		} else {
104		    return false;
105		}
106    }	
107}
108
109function unsetCookie(name, path, domain) {
110  var Value = readCookie(name); // We need the value to kill the cookie
111  if(Value) {
112      document.cookie = name + '=' + Value + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'');
113  }
114}
115
116
117var legend;
118
119function openlegend(tab) {
120	legend = window.open ('/legend.htm?tab='+tab,'legend',"width=550,height=450,screenX=20,screenY=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
121	setTimeout ("legend.focus ()",500);
122	return false;
123}
124
125function openmemo(subject) {
126	memo = window.open ('/memo.php?ref='+subject+'&amp;p='+escape(self.location),'memo',"width=600,height=380,screenX=20,screenY=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
127	setTimeout ("memo.focus ()",500);
128	return false;
129}
130
131function openwin(url,w,h) {
132	win = window.open (url,'win',"width="+w+",height="+h+",screenX=20,screenY=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
133	setTimeout ("win.focus ()",500);
134	return false;
135}
136
137var mapinput;
138
139function openmapinput() {
140	mapinput = window.open ('/map_input.php','mapinput',"width=550,height=450,screenX=20,screenY=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
141}
142
143function bookmark(site) {
144	var url = encodeURIComponent(self.location);
145	var title = encodeURIComponent(document.title);
146	meta = document.getElementsByTagName('meta');
147	for (var i = 0;i < meta.length;i++) {
148		if (meta[i].getAttribute('name') == 'description') {
149			var desc = encodeURIComponent(meta[i].getAttribute('content'));
150		}
151	}
152	switch(site) {		
153		case 'twitter':
154			window.open('https://twitter.com/share?text='+title+'&url='+url); break;
155		case 'google+': 
156			window.open('https://plus.google.com/share?url='+url); break;
157		case 'facebook': 
158			window.open('https://www.facebook.com/sharer/sharer.php?u='+url+'&t='+title); break;
159
160// old services
161		case 'delicious':
162			window.open('http://del.icio.us/post?url='+url+'&title='+title); break;
163		case 'mrwong':
164			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+url+'&bm_description='+title); break;
165		case 'linkarena':	
166			window.open('http://linkarena.com/bookmarks/addlink/?url='+url+'&title='+title+'&desc='+desc+'&tags='); break;
167		case 'webnews': 		
168			window.open('http://www.webnews.de/einstellen?url='+url+'&title='+title); break;
169		case 'yigg':
170			window.open('http://yigg.de/neu?exturl='+url+'&exttitle='+title+'&extdesc='+desc); break;	
171	}	
172}

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.