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 4122dc7c0de0bc04ebe78409fb955ea4c784f028..413890f1a5af0bb6bbdae2b92fb66af81577eb20 100644 |
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js |
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js |
@@ -49,12 +49,18 @@ function setTitle(title) { |
collapse.style.height = "0px"; |
holder.textContent = title; |
+ document.title = title; |
var newHeight = Math.max(90, holder.getBoundingClientRect().height); |
collapse.style.transition = "height 0.2s"; |
collapse.style.height = newHeight + "px"; |
} |
+// Set the text direction of the document ('ltr', 'rtl', or 'auto'). |
+function setTextDirection(direction) { |
+ document.body.setAttribute('dir', direction); |
+} |
+ |
// Maps JS Font Family to CSS class and then changes body class name. |
// CSS classes must agree with distilledpage.css. |
function useFontFamily(fontFamily) { |