[PDFHistory] Fix "Warning: Unhandled rejection: [Exception... "The operation is insecure."" in Firefox 25
This commit is contained in:
parent
58b781c92f
commit
44725d4657
@ -132,16 +132,18 @@ var PDFHistory = {
|
|||||||
|
|
||||||
_pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj,
|
_pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj,
|
||||||
replace) {
|
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) {
|
if (replace) {
|
||||||
window.history.replaceState(stateObj, '', urlParam);
|
//#if (GENERIC || CHROME)
|
||||||
|
window.history.replaceState(stateObj, '', document.URL);
|
||||||
|
//#else
|
||||||
|
// window.history.replaceState(stateObj, '');
|
||||||
|
//#endif
|
||||||
} else {
|
} else {
|
||||||
window.history.pushState(stateObj, '', urlParam);
|
//#if (GENERIC || CHROME)
|
||||||
|
window.history.pushState(stateObj, '', document.URL);
|
||||||
|
//#else
|
||||||
|
// window.history.pushState(stateObj, '');
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user