Check if viewer is embedded only once and cache the result

This commit is contained in:
Jonas 2013-07-20 16:33:40 +02:00
parent 12d9b6570b
commit d99b7753d6
2 changed files with 7 additions and 6 deletions

View file

@ -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;