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

Unified Diff: chrome/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js

Issue 9721013: Move topSites API out of experimental (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge Created 8 years, 9 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/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js
diff --git a/chrome/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js b/chrome/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js
index 851d745eb63423ef0253054d7d38c6cd8cbf3835..d0d1caa1c059f76830bd30d1af5fd87dea745aa9 100644
--- a/chrome/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js
+++ b/chrome/common/extensions/docs/examples/api/topsites/magic8ball/newTab.js
@@ -9,15 +9,12 @@ function $(id) {
function thumbnailsGotten(data) {
var eightBallWindow = $('mostVisitedThumb');
var rand = Math.floor(Math.random() * data.length);
- eightBallWindow.style.backgroundImage =
- 'url(chrome://thumb/' + data[rand].url + ')';
eightBallWindow.href = data[rand].url;
-
- var span = eightBallWindow.querySelector('span');
- span.textContent = data[rand].title;
- span.style.backgroundImage = 'url(chrome://favicon/' + data[rand].url + ')';
+ eightBallWindow.textContent = data[rand].title;
+ eightBallWindow.style.backgroundImage = 'url(chrome://favicon/' +
+ data[rand].url + ')';
}
window.onload = function() {
- chrome.experimental.topSites.get(thumbnailsGotten);
+ chrome.topSites.get(thumbnailsGotten);
}

Powered by Google App Engine
This is Rietveld 408576698