Bugzilla – Attachment 47385 Details for
Bug 14523
Google jackets being blocked when OPAC using HTTPS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Checks current URL and connects to appropriate google resource
0001-Bug-14523-Google-jackets-being-blocked-when-OPAC-usi.patch (text/plain), 2.10 KB, created by
Barry Cannon
on 2016-01-28 12:11:00 UTC
(
hide
)
Description:
Checks current URL and connects to appropriate google resource
Filename:
MIME Type:
Creator:
Barry Cannon
Created:
2016-01-28 12:11:00 UTC
Size:
2.10 KB
patch
obsolete
>From 9f5074b55b7128ef1f7c3216042c4ebd0c6b991b Mon Sep 17 00:00:00 2001 >From: Barry Cannon <bc@interleaf.ie> >Date: Thu, 28 Jan 2016 11:40:54 +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 | 8 +++++--- > 1 file changed, 5 insertions(+), 3 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..ca2e0ef 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js >@@ -1,13 +1,14 @@ > if (typeof KOHA == "undefined" || !KOHA) { > var KOHA = {}; > } >+ >+var prefix = location.protocol; > > /** > * A namespace for Google related functions. > */ > KOHA.Google = { > >- > /** > * Search all: > * <div title="biblionumber" id="isbn" class="gbs-thumbnail"></div> >@@ -27,7 +28,7 @@ KOHA.Google = { > this.openInNewWindow=newWindow; > scriptElement.setAttribute("id", "jsonScript"); > scriptElement.setAttribute("src", >- "http://books.google.com/books?bibkeys=" + escape(bibkeys) + >+ prefix + "//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 +60,8 @@ KOHA.Google = { > '<a '+target+'href="' + > book.info_url + > '"><img src="' + >- 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_sticker1.gif' + >+ prefix + >+ '//books.google.com/intl/en/googlebooks/images/gbs_preview_sticker1.gif' + > '"></a></div>' > ); > } >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14523
:
40988
|
47385
|
47500
|
47501
|
47511
|
47544