diff options
Diffstat (limited to 'js/files_pdfviewer-workersrc.js')
-rw-r--r-- | js/files_pdfviewer-workersrc.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/files_pdfviewer-workersrc.js b/js/files_pdfviewer-workersrc.js index 2903205..15eee71 100644 --- a/js/files_pdfviewer-workersrc.js +++ b/js/files_pdfviewer-workersrc.js @@ -19,7 +19,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * - */const o=document.getElementById("hideDownload");t.a=()=>!o||o&&"true"!==o.value},76:function(e,t,n){"use strict";n.r(t);var o=n(17); + */var o=document.getElementById("hideDownload");t.a=function(){return!o||o&&"true"!==o.value}},76:function(e,t,n){"use strict";n.r(t);var o=n(17); /** * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com> * @@ -40,5 +40,5 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * - */window.location===window.parent.location&&(window.location.href="/"),document.addEventListener("webviewerloaded",(function(){if(PDFViewerApplicationOptions.set("disablePreferences",!0),PDFViewerApplicationOptions.set("externalLinkTarget",pdfjsLib.LinkTarget.BLANK),PDFViewerApplicationOptions.set("isEvalSupported",!1),PDFViewerApplicationOptions.set("workerSrc",document.getElementsByTagName("head")[0].getAttribute("data-workersrc")),PDFViewerApplicationOptions.set("cMapUrl",document.getElementsByTagName("head")[0].getAttribute("data-cmapurl")),PDFViewerApplication.download=function(){function e(e){let t=0;const n=e.length;for(;t<n&&""===e[t].trim();)t++;return"data:"===e.substr(t,5).toLowerCase()}const t=decodeURIComponent(window.location.search.substr(6));this.downloadManager.downloadUrl(t,function(t){const n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if(e(t))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),n;const o=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=o.exec(t);let a=r.exec(i[1])||r.exec(i[2])||r.exec(i[3]);if(a&&(a=a[0],-1!==a.indexOf("%")))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){console.debug(e)}return a||n}(t))},!Object(o.a)()){PDFViewerApplication.download=function(){};const e=document.getElementById("toolbarViewerRight").querySelector("button.download");e&&(e.style.display="none"),delete PDFViewerApplication.supportsPrinting,PDFViewerApplication.supportsPrinting=!1,PDFViewerApplication.beforePrint=function(){},document.getElementById("viewer").classList.add("disabledTextSelection"),console.debug("Files_PDFViewer, download and print disabled")}}),!0)}}); -//# sourceMappingURL=files_pdfviewer-workersrc.js.map?v=89a27b60f0207ea0ba12
\ No newline at end of file + */window.location===window.parent.location&&(window.location.href="/"),document.addEventListener("webviewerloaded",(function(){if(PDFViewerApplicationOptions.set("disablePreferences",!0),PDFViewerApplicationOptions.set("externalLinkTarget",pdfjsLib.LinkTarget.BLANK),PDFViewerApplicationOptions.set("isEvalSupported",!1),PDFViewerApplicationOptions.set("workerSrc",document.getElementsByTagName("head")[0].getAttribute("data-workersrc")),PDFViewerApplicationOptions.set("cMapUrl",document.getElementsByTagName("head")[0].getAttribute("data-cmapurl")),PDFViewerApplication.download=function(){function e(e){for(var t=0,n=e.length;t<n&&""===e[t].trim();)t++;return"data:"===e.substr(t,5).toLowerCase()}var t=decodeURIComponent(window.location.search.substr(6));this.downloadManager.downloadUrl(t,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if(e(t))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),n;var o=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=o.exec(t),a=r.exec(i[1])||r.exec(i[2])||r.exec(i[3]);if(a&&-1!==(a=a[0]).indexOf("%"))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){console.debug(e)}return a||n}(t))},!Object(o.a)()){PDFViewerApplication.download=function(){};var e=document.getElementById("toolbarViewerRight").querySelector("button.download");e&&(e.style.display="none"),delete PDFViewerApplication.supportsPrinting,PDFViewerApplication.supportsPrinting=!1,PDFViewerApplication.beforePrint=function(){},document.getElementById("viewer").classList.add("disabledTextSelection"),console.debug("Files_PDFViewer, download and print disabled")}}),!0)}}); +//# sourceMappingURL=files_pdfviewer-workersrc.js.map?v=6c2ba3d3495f32ee09fb
\ No newline at end of file |