summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/new_tab.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/new_tab.html')
-rw-r--r--chrome/browser/resources/new_tab.html28
1 files changed, 23 insertions, 5 deletions
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html
index 55fd3bf..8eb0edc 100644
--- a/chrome/browser/resources/new_tab.html
+++ b/chrome/browser/resources/new_tab.html
@@ -280,6 +280,7 @@ a.thumbnail {
line-height:16px;
display:block;
margin:3px 0px 3px 0px;
+ padding-left:22px;
}
.recent-window-container img {
margin:0 3px -2px 3px;
@@ -400,7 +401,8 @@ html[dir='rtl'] #searches input {
<body onload="logEvent('body onload fired');"
jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div id="l10n" style="display:none;">
- <span id="closedwindow" jscontent="closedwindow">Window</span>
+ <span id="closedwindowsingle" jscontent="closedwindowsingle">1 Tab</span>
+ <span id="closedwindowmultiple" jscontent="closedwindowmultiple">% Tabs</span>
</div>
<script>
// We apply the size class here so that we don't trigger layout animations onload.
@@ -786,7 +788,7 @@ function renderRecentlyClosedTabs(entries) {
var linkSpanContainer = DOM('div', { className: 'recent-window-container'});
var linkSpan = DOM('span');
- linkSpan.appendChild(document.createTextNode(" ("));
+ linkSpan.appendChild(document.createTextNode(" "));
for (var windowIndex = 0; windowIndex < entry.tabs.length; windowIndex++) {
var tab = entry.tabs[windowIndex];
var tabImg = DOM('img', {
@@ -796,12 +798,11 @@ function renderRecentlyClosedTabs(entries) {
tabImg.onmousedown = function() { return false; }
linkSpan.appendChild(tabImg);
}
- linkSpan.appendChild(document.createTextNode(")"));
link = DOM('span', { className: 'recently-closed-window-link' } );
windowSpan = DOM('span', {className: 'recently-close-window-text'});
- windowSpan.appendChild(
- document.createTextNode(localStrings.getString('closedwindow')));
+ windowSpan.appendChild(document.createTextNode(
+ recentlyClosedWindowText(entry.tabs.length)));
link.appendChild(windowSpan);
link.appendChild(linkSpan);
linkSpanContainer.appendChild(link);
@@ -828,6 +829,19 @@ function renderRecentlyClosedTabs(entries) {
}
/**
+ * Returns the text used for a recently closed window.
+ *
+ * @param numTabs number of tabs in the window
+ *
+ * @return the text to use
+ */
+function recentlyClosedWindowText(numTabs) {
+ if (numTabs == 1)
+ return localStrings.getString('closedwindowsingle');
+ return localStrings.getString('closedwindowmultiple').replace('%', numTabs);
+}
+
+/**
* Creates an item to go in the recent bookmarks or recently closed lists.
*
* @param {String} tagName Tagname for the DOM element to create.
@@ -1033,6 +1047,10 @@ setTimeout(function(){document.getElementById('main').className = 'visible'},
.edit-mode div.edit-cross:active {
background: url('../../app/theme/ntp_x_icon_active.png');
}
+.recent-window-container {
+ background: url('../../app/theme/closed_window.png');
+ background-repeat: no-repeat;
+}
</style>
</html>