Avoid to load Google Custom Search API for offline docs.
This commit is contained in:
parent
292fdb4d83
commit
8acaed6a00
1 changed files with 10 additions and 10 deletions
|
|
@ -148,22 +148,22 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{%- if include_analytics %}
|
||||||
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
|
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST});
|
google.load('search', '1', {language : 'en', style : google.loader.themes.MINIMALIST});
|
||||||
google.setOnLoadCallback(function() {
|
google.setOnLoadCallback(function() {
|
||||||
var customSearchOptions = {}; var customSearchControl = new google.search.CustomSearchControl(
|
var customSearchOptions = {}; var customSearchControl = new google.search.CustomSearchControl(
|
||||||
'003065520604945464838:izzukx8-qba', customSearchOptions);
|
'003065520604945464838:izzukx8-qba', customSearchOptions);
|
||||||
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
||||||
customSearchControl.draw('cse');
|
customSearchControl.draw('cse');
|
||||||
var path = window.location.pathname.split('/').slice(0,4);
|
var path = window.location.pathname.split('/').slice(0,4);
|
||||||
if(window.location.hostname && path.length >= 4) {
|
if(window.location.hostname && path.length >= 4) {
|
||||||
var site = "site:" + window.location.hostname + path.join('/').toString();
|
var site = "site:" + window.location.hostname + path.join('/').toString();
|
||||||
customSearchControl.setSearchStartingCallback(this, function(c, s, q) { s.setQueryAddition(site); });
|
customSearchControl.setSearchStartingCallback(this, function(c, s, q) { s.setQueryAddition(site); });
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
</script>
|
</script>
|
||||||
{%- if include_analytics %}
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.gsc-control-cse {
|
.gsc-control-cse {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue