openstack-manuals/www/templates/script_search.tmpl
Andreas Jaeger 229b3b2a74 [www] Use https in more places
Switch over to https where possible for more files.

This addresses the templates folder.

Change-Id: I817c62556087edba32d51f32a283ab7f01042a41
2016-10-28 09:49:02 +02:00

30 lines
1.3 KiB
Cheetah

<script src="https://www.google.com/jsapi" type="text/javascript">
</script>
<script type="text/javascript">
//<![CDATA[
google.load('search', '1', {
language: 'en'
});
var _gaq = _gaq ||[];
_gaq.push([ "_setAccount", "UA-17511903-1"]);
function _trackQuery(control, searcher, query) {
var gaQueryParamName = "q";
var loc = document.location;
var url =[
loc.pathname,
loc.search,
loc.search ? '&': '?',
gaQueryParamName == '' ? 'q': encodeURIComponent(gaQueryParamName),
'=',
encodeURIComponent(query)].join('');
_gaq.push([ "_trackPageview", url]);
}
google.setOnLoadCallback(function () {
var customSearchControl = new google.search.CustomSearchControl('011012898598057286222:elxsl505o0o');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.setSearchStartingCallback(null, _trackQuery);
customSearchControl.draw('cse');
},
true);//]]>
</script>