Check if viewer is embedded only once and cache the result
This commit is contained in:
parent
12d9b6570b
commit
d99b7753d6
2 changed files with 7 additions and 6 deletions
|
@ -23,9 +23,9 @@ var PDFHistory = {
|
|||
initialDestination: null,
|
||||
|
||||
initialize: function pdfHistoryInitialize(fingerprint) {
|
||||
if (PDFJS.disableHistory || window.parent !== window) {
|
||||
if (PDFJS.disableHistory || PDFView.isViewerEmbedded) {
|
||||
// The browsing history is only enabled when the viewer is standalone,
|
||||
// i.e. not when it is embedded in a page.
|
||||
// i.e. not when it is embedded in a web page.
|
||||
return;
|
||||
}
|
||||
this.initialized = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue