Drop third parameter to replaceState/pushState
This was introduced in #3582 to work around https://crbug.com/274024 . The bug in Chrome has been fixed a long time ago (at least 33), so let's simplify the code.
This commit is contained in:
parent
628e70fbb5
commit
e904b8a67c
@ -281,23 +281,10 @@ class PDFHistory {
|
|||||||
this._updateInternalState(destination, newState.uid);
|
this._updateInternalState(destination, newState.uid);
|
||||||
|
|
||||||
if (shouldReplace) {
|
if (shouldReplace) {
|
||||||
if (typeof PDFJSDev !== 'undefined' &&
|
window.history.replaceState(newState, '');
|
||||||
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);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this._maxUid = this._uid;
|
this._maxUid = this._uid;
|
||||||
|
window.history.pushState(newState, '');
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user