Fix user manual search not working over https

This commit is contained in:
Kovid Goyal 2016-03-04 20:35:36 +05:30
parent 5d404dd5ab
commit 1ce62bb882
2 changed files with 5 additions and 6 deletions

View File

@ -26,7 +26,7 @@
<div class="body">
{% if not embedded %}
<div id="ad-container" style="text-align:center">
<script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-5939552585043235"
@ -63,7 +63,7 @@
{% block sidebarlogo %}
<p class="logo">
<a href="http://calibre-ebook.com"><img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/></a>
<a href="//calibre-ebook.com"><img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/></a>
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" title="Contribute to support calibre development">

View File

@ -10,7 +10,7 @@
{% extends "layout.html" %}
{% set title = _('Search') %}
{% block extrahead %}
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<link rel="stylesheet" href="https://www.google.com/cse/style/look/default.css" type="text/css" />
{{ super() }}
{% endblock %}
{% block body %}
@ -29,7 +29,7 @@
containing fewer words won't appear in the result list.{% endtrans %}
</p>
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1');
google.setOnLoadCallback(function() {
@ -41,8 +41,7 @@
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="search"]')[0].value = query;
$('input.gsc-search-button')[0].click();
customSearchControl.execute(query);
}
}, true);
</script>