From 6678ff7293891cc9f111395c589c7082c4fcced0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 16 May 2019 15:28:37 +0200 Subject: [PATCH] wait #2687 @0.5 --- js/libs/fluidbook/fluidbook.share.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.share.js b/js/libs/fluidbook/fluidbook.share.js index 0e7b8d20..aaeaba83 100644 --- a/js/libs/fluidbook/fluidbook.share.js +++ b/js/libs/fluidbook/fluidbook.share.js @@ -2,11 +2,11 @@ function FluidbookShare(fluidbook) { this.fluidbook = fluidbook; if (this.isEnabled()) { var $this = this; - if (this.fluidbook.datas.phonegap != 'android') { + if (this.fluidbook.datas.phonegap !== 'android') { $(document).on('click', '.share', function () { var f = 'send' + ucfirst($(this).data('service')); var url = $(this).data("url"); - if (url == undefined || url == null || url == 'undefined') { + if (url === undefined || url === null || url === 'undefined') { url = ''; } $this[f](url); @@ -35,7 +35,7 @@ function FluidbookShare(fluidbook) { } }); - if (this.fluidbook.datas.phonegap == 'android') { + if (this.fluidbook.datas.phonegap === 'android') { $(document).on('click', '#shareLinks, #shareLinks a', function (e) { e.stopPropagation(); e.stopImmediatePropagation(); @@ -54,6 +54,10 @@ FluidbookShare.prototype = { getFluidbookURL: function () { var l = window.location.toString(); + if (this.fluidbook.datas.restrictPrintDownload !== "") { + l = l.replace('?' + this.fluidbook.datas.restrictPrintDownload, ''); + l = l.replace(this.fluidbook.datas.restrictPrintDownload, ''); + } var e = l.split("#"); return e[0]; }, @@ -66,7 +70,7 @@ FluidbookShare.prototype = { if (url == '') { var res = false; if (this.fluidbook.support.offline || this.fluidbook.datas.phonegap) { - if (this.fluidbook.datas.offlineLink != '' && this.fluidbook.datas.offlineLink != 'http://') { + if (this.fluidbook.datas.offlineLink !== '' && this.fluidbook.datas.offlineLink !== 'http://') { res = this.fluidbook.datas.offlineLink; } } else { @@ -180,7 +184,7 @@ FluidbookShare.prototype = { openShare: function (url, p2, callback) { var view; - if (url == undefined || url == null || url == 'undefined' || !url) { + if (url === undefined || url === null || url === 'undefined' || !url) { url = ''; } -- 2.39.5