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