From 44725d46578ef508bafae9269fc46029e6368134 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 23 Nov 2013 12:15:39 +0100 Subject: [PATCH] [PDFHistory] Fix "Warning: Unhandled rejection: [Exception... "The operation is insecure."" in Firefox 25 --- web/pdf_history.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/web/pdf_history.js b/web/pdf_history.js index 86874f786..e1a32f43b 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -132,16 +132,18 @@ var PDFHistory = { _pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj, replace) { - // In Firefox, 'urlParam' needs to be undefined in order to prevent issues - // when local files are opened. - var urlParam; -//#if (GENERIC || CHROME) - urlParam = document.URL; -//#endif if (replace) { - window.history.replaceState(stateObj, '', urlParam); +//#if (GENERIC || CHROME) + window.history.replaceState(stateObj, '', document.URL); +//#else +// window.history.replaceState(stateObj, ''); +//#endif } else { - window.history.pushState(stateObj, '', urlParam); +//#if (GENERIC || CHROME) + window.history.pushState(stateObj, '', document.URL); +//#else +// window.history.pushState(stateObj, ''); +//#endif } },