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

Side by Side Diff: components/ntp_tiles/webui/resources/ntp_tiles_internals.js

Issue 2841643005: [Popular Sites] Add Variations parameter to override URL path (Closed)
Patch Set: Update ntp-tiles-internals. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('chrome.ntp_tiles_internals', function() { 5 cr.define('chrome.ntp_tiles_internals', function() {
6 'use strict'; 6 'use strict';
7 7
8 var initialize = function() { 8 var initialize = function() {
9 $('submit-update').addEventListener('click', function(event) { 9 $('submit-update').addEventListener('click', function(event) {
10 event.preventDefault(); 10 event.preventDefault();
11 chrome.send('update', [{ 11 chrome.send('update', [{
12 "popular": { 12 "popular": {
13 "overrideURL": $('override-url').value, 13 "overrideURL": $('override-url').value,
14 "overrideDirectory": $('override-directory').value,
14 "overrideCountry": $('override-country').value, 15 "overrideCountry": $('override-country').value,
15 "overrideVersion": $('override-version').value, 16 "overrideVersion": $('override-version').value,
16 }, 17 },
17 }]); 18 }]);
18 }); 19 });
19 20
20 $('suggestions-fetch').addEventListener('click', function(event) { 21 $('suggestions-fetch').addEventListener('click', function(event) {
21 event.preventDefault(); 22 event.preventDefault();
22 chrome.send('fetchSuggestions'); 23 chrome.send('fetchSuggestions');
23 }); 24 });
(...skipping 21 matching lines...) Expand all
45 // Return an object with all of the exports. 46 // Return an object with all of the exports.
46 return { 47 return {
47 initialize: initialize, 48 initialize: initialize,
48 receiveSourceInfo: receiveSourceInfo, 49 receiveSourceInfo: receiveSourceInfo,
49 receiveSites: receiveSites, 50 receiveSites: receiveSites,
50 }; 51 };
51 }); 52 });
52 53
53 document.addEventListener('DOMContentLoaded', 54 document.addEventListener('DOMContentLoaded',
54 chrome.ntp_tiles_internals.initialize); 55 chrome.ntp_tiles_internals.initialize);
55
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698