-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
42 lines (37 loc) · 1.15 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
layout: page
title: Suche
---
{% include JB/setup %}
<script>
function getQueryParams(qs) { // http://stackoverflow.com/a/1099670/238931
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
}
var query = getQueryParams(document.location.search);
if(query.q !== undefined){
document.getElementById("sitewide_search_field").value = query.q;
if(document.querySelector !== undefined){
document.querySelector(".page-header h1").innerText = "Suche nach '" + query.q + "'";
}
}
</script>
<script>
(function() {
var cx = '017336582802202524794:hnvkpuuzaki';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchresults-only></gcse:searchresults-only>