From 1fa013d60f5ed2b187d8dcbb11b9a2fc0b0156fd Mon Sep 17 00:00:00 2001 From: Barry Cannon Date: Mon, 1 Feb 2016 11:34:35 +0000 Subject: [PATCH] Bug 14523 - Google jackets being blocked when OPAC using HTTPS Adds prefix variable to get the protocol of the current URL. This results is the correct prefix being used to serve the google jackets regarless of koha apache server setup. --- koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js b/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js index b23599f..0305492 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js @@ -27,7 +27,7 @@ KOHA.Google = { this.openInNewWindow=newWindow; scriptElement.setAttribute("id", "jsonScript"); scriptElement.setAttribute("src", - "http://books.google.com/books?bibkeys=" + escape(bibkeys) + + location.protocol + "//books.google.com/books?bibkeys=" + escape(bibkeys) + "&jscmd=viewapi&callback=KOHA.Google.gbsCallBack"); scriptElement.setAttribute("type", "text/javascript"); document.documentElement.firstChild.appendChild(scriptElement); @@ -59,7 +59,8 @@ KOHA.Google = { '' ); } -- 1.7.10.4