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

Unified Diff: components/ntp_tiles/webui/resources/ntp_tiles_internals.js

Issue 2572133002: Add more features to ntp-tiles-internal (Closed)
Patch Set: Add ntp_tiles owners to client webui owners Created 3 years, 10 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
« no previous file with comments | « components/ntp_tiles/webui/resources/ntp_tiles_internals.html ('k') | ios/chrome/browser/ui/webui/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/webui/resources/ntp_tiles_internals.js
diff --git a/components/ntp_tiles/webui/resources/ntp_tiles_internals.js b/components/ntp_tiles/webui/resources/ntp_tiles_internals.js
index bcb05d5e68c1236829842dd00cb5e8d0b36bcdf7..dedcdf360342a233f08c2a61e36fa7c2529934ff 100644
--- a/components/ntp_tiles/webui/resources/ntp_tiles_internals.js
+++ b/components/ntp_tiles/webui/resources/ntp_tiles_internals.js
@@ -16,7 +16,21 @@ cr.define('chrome.ntp_tiles_internals', function() {
"overrideCountry": $('override-country').value,
"overrideVersion": $('override-version').value,
},
- }])
+ }]);
+ });
+
+ $('suggestions-fetch').addEventListener('click', function(event) {
+ event.preventDefault();
+ chrome.send('fetchSuggestions');
+ });
+
+ $('popular-view-json').addEventListener('click', function(event) {
+ event.preventDefault();
+ if ($('popular-json-value').textContent === "") {
+ chrome.send('viewPopularSitesJson');
+ } else {
+ $('popular-json-value').textContent = "";
+ }
});
chrome.send('registerForEvents');
« no previous file with comments | « components/ntp_tiles/webui/resources/ntp_tiles_internals.html ('k') | ios/chrome/browser/ui/webui/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698