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

Unified Diff: chrome/browser/resources/ntp4/suggestions_page.js

Issue 10115001: Added page score to the ntp suggestions tab. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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: chrome/browser/resources/ntp4/suggestions_page.js
diff --git a/chrome/browser/resources/ntp4/suggestions_page.js b/chrome/browser/resources/ntp4/suggestions_page.js
index eefd8a79b2b1087e2c951a7c0243c29454ae53c5..dece9b76f9a64642188ee4bb50fe4abea3967129 100644
--- a/chrome/browser/resources/ntp4/suggestions_page.js
+++ b/chrome/browser/resources/ntp4/suggestions_page.js
@@ -70,7 +70,8 @@ cr.define('ntp', function() {
'<span class="favicon"></span>' +
'</span>' +
'<div class="color-stripe"></div>' +
- '<span class="title"></span>';
+ '<span class="title"></span>' +
+ '<span class="score"></span>';
this.querySelector('.close-button').title =
templateData.removethumbnailtooltip;
@@ -112,6 +113,9 @@ cr.define('ntp', function() {
title.textContent = data.title;
title.dir = data.direction;
+ var score = this.querySelector('.score');
+ score.textContent = data.score;
+
// Sets the tooltip.
this.title = data.title;
@@ -272,8 +276,8 @@ cr.define('ntp', function() {
* @return {number} The height.
*/
function heightForWidth(width) {
- // The 2s are for borders, the 31 is for the title.
- return (width - 2) * 132 / 212 + 2 + 31;
+ // The 2s are for borders, the 36 is for the title and score.
+ return (width - 2) * 132 / 212 + 2 + 36;
}
var THUMBNAIL_COUNT = 8;

Powered by Google App Engine
This is Rietveld 408576698