diff --git a/web/pdf_history.js b/web/pdf_history.js index 5bdc17b92..3ca1df2cd 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -281,23 +281,10 @@ class PDFHistory { this._updateInternalState(destination, newState.uid); if (shouldReplace) { - if (typeof PDFJSDev !== 'undefined' && - PDFJSDev.test('FIREFOX || MOZCENTRAL')) { - // Providing the third argument causes a SecurityError for file:// URLs. - window.history.replaceState(newState, ''); - } else { - window.history.replaceState(newState, '', document.URL); - } + window.history.replaceState(newState, ''); } else { this._maxUid = this._uid; - - if (typeof PDFJSDev !== 'undefined' && - PDFJSDev.test('FIREFOX || MOZCENTRAL')) { - // Providing the third argument causes a SecurityError for file:// URLs. - window.history.pushState(newState, ''); - } else { - window.history.pushState(newState, '', document.URL); - } + window.history.pushState(newState, ''); } if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&