| Index: chrome/browser/resources/new_new_tab.js
|
| diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
|
| index 6b3be4ad5560bb9e2ead69d5f11da662574cb817..77bf754c4a47bfa562f460b8a2095a077de817f3 100644
|
| --- a/chrome/browser/resources/new_new_tab.js
|
| +++ b/chrome/browser/resources/new_new_tab.js
|
| @@ -908,6 +908,13 @@ function handleIfEnterKey(f) {
|
| };
|
| }
|
|
|
| +function handleIfMiddleClick(f) {
|
| + return function(e) {
|
| + if (e.button == 1)
|
| + f(e);
|
| + };
|
| +}
|
| +
|
| function maybeReopenTab(e) {
|
| var el = findAncestor(e.target, function(el) {
|
| return el.sessionId !== undefined;
|
| @@ -1202,12 +1209,20 @@ function isDoneLoading() {
|
| return !document.body.classList.contains('loading');
|
| }
|
|
|
| +function recordWebStoreLaunch() {
|
| + chrome.send('recordWebStoreLaunch', []);
|
| +}
|
| +
|
| // Initialize the apps promo.
|
| document.addEventListener('DOMContentLoaded', function() {
|
| var promoText1 = $('apps-promo-text1');
|
| promoText1.innerHTML = promoText1.textContent;
|
| promoText1.querySelector('a').href = localStrings.getString('web_store_url');
|
|
|
| + var promoLink = promoText1.querySelector('a');
|
| + promoLink.onclick = recordWebStoreLaunch;
|
| + promoLink.onmousedown = handleIfMiddleClick(recordWebStoreLaunch);
|
| +
|
| $('apps-promo-hide').addEventListener('click', function() {
|
| chrome.send('hideAppsPromo', []);
|
| document.documentElement.classList.remove('apps-promo-visible');
|
|
|