Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Unified Diff: components/dom_distiller/core/javascript/dom_distiller_viewer.js

Issue 1920563002: Only trigger navigation in distiller if in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_distiller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/javascript/dom_distiller_viewer.js
diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
index 5baef4c077b01e799ed52389fda294a596d17fb9..8f1ff42c8099a35ba52d6a4a08cd2a1c149f5fd6 100644
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
@@ -43,7 +43,8 @@ function showLoadingIndicator(isLastPage) {
// This function will be one of the last things to occur when a page is
// loaded. This is temporarily used to signal print preview to generate
// a PDF.
- if (isLastPage) {
+ if (isLastPage && typeof is_print_preview_distiller != 'undefined'
wychen 2016/04/23 03:00:19 !== feels safer, even though in this case it doesn
mdjones 2016/04/25 15:22:34 Done.
+ && is_print_preview_distiller) {
setTimeout(function() {
window.location = window.location + "#loaded";
}, 0);
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_distiller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698