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

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

Issue 1294663003: Fix various issues from r343263. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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 915134af6ffcda692b5b184ea5c544543f18a1ea..4a05f2f24256a99f5366ef36b62bd4014fda07f0 100644
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
@@ -5,14 +5,19 @@
// This variable will be changed by iOS scripts.
var distiller_on_ios = false;
+var navigate_on_initial_content_load = false;
+
+function didNavigateOnInitialContentLoad() {
+ navigate_on_initial_content_load = true;
+}
+
function addToPage(html) {
var div = document.createElement('div');
div.innerHTML = html;
document.getElementById('content').appendChild(div);
fillYouTubePlaceholders();
- if (typeof navigate_on_initial_content_load !== 'undefined' &&
Lei Zhang 2015/08/14 05:44:36 Why isn't |navigate_on_initial_content_load| prope
csaavedra 2015/08/14 08:21:37 As explained earlier, the code injected from Print
- navigate_on_initial_content_load) {
+ if (navigate_on_initial_content_load) {
navigate_on_initial_content_load = false;
setTimeout(function() {
window.location = window.location + "#loaded";

Powered by Google App Engine
This is Rietveld 408576698