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

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: Addressed comment 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 594951be4a819feef8290a45c2e5aaa5b3a33a1c..4e4f0d63d5fe197fe4a873d91af7fa03f2b73fc2 100644
--- a/chrome/browser/resources/ntp4/suggestions_page.js
+++ b/chrome/browser/resources/ntp4/suggestions_page.js
@@ -60,7 +60,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 =
loadTimeData.getString('removethumbnailtooltip');
@@ -102,6 +103,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;
@@ -263,8 +267,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;
« no previous file with comments | « chrome/browser/resources/ntp4/suggestions_page.css ('k') | chrome/browser/ui/webui/ntp/suggestions_page_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698