summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/i18n_template.js34
-rw-r--r--chrome/browser/resources/new_tab.html9
2 files changed, 28 insertions, 15 deletions
diff --git a/chrome/browser/resources/i18n_template.js b/chrome/browser/resources/i18n_template.js
index 00289028..8166ddc 100644
--- a/chrome/browser/resources/i18n_template.js
+++ b/chrome/browser/resources/i18n_template.js
@@ -47,23 +47,29 @@ var i18nTemplate = (function() {
if (a) {
var propName = a[1];
var propExpr = a[2];
- var value = obj[propExpr];
- if (propName.charAt(0) == '.') {
- var path = propName.slice(1).split('.');
- var object = element;
- while (object && path.length > 1) {
- object = object[path.shift()];
- }
- if (object) {
- object[path] = value;
- // In case we set innerHTML (ignoring others) we need to
- // recursively check the content
- if (path == 'innerHTML') {
- process(element, obj);
+
+ // Ignore missing properties
+ if (propExpr in obj) {
+ var value = obj[propExpr];
+ if (propName.charAt(0) == '.') {
+ var path = propName.slice(1).split('.');
+ var object = element;
+ while (object && path.length > 1) {
+ object = object[path.shift()];
+ }
+ if (object) {
+ object[path] = value;
+ // In case we set innerHTML (ignoring others) we need to
+ // recursively check the content
+ if (path == 'innerHTML') {
+ process(element, obj);
+ }
}
+ } else {
+ element.setAttribute(propName, value);
}
} else {
- element.setAttribute(propName, value);
+ console.warn('i18n-values: Missing value for "' + propExpr + '"');
}
}
}
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html
index 50f8c1d..80bbcd6 100644
--- a/chrome/browser/resources/new_tab.html
+++ b/chrome/browser/resources/new_tab.html
@@ -435,7 +435,7 @@ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded);
<td valign="top" width="230">
<div align="right">
<img src="../../app/theme/%DISTRIBUTION%/product_logo.png"
- width="145" height="52" style="padding-bottom:8px;" />
+ height="52" style="padding-bottom:8px;" />
</div>
<!-- This iframe gets shown in resizeP13N -->
<iframe id="p13n" frameborder="0" width="100%" scrolling="no" height="0"
@@ -1029,6 +1029,13 @@ html[dir='rtl'] .recent-window-container {
background-position: right;
padding-right: 22px;
}
+/* override style set in theme.css which is designed for the NNTP */
+#main {
+ background-image: none;
+}
+.section {
+ border: 0;
+}
</style>
</html>