OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more | 5 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more |
6 // than this many items in the miniview. | 6 // than this many items in the miniview. |
7 var MAX_MINIVIEW_ITEMS = 15; | 7 var MAX_MINIVIEW_ITEMS = 15; |
8 | 8 |
9 // Extra spacing at the top of the layout. | 9 // Extra spacing at the top of the layout. |
10 var LAYOUT_SPACING_TOP = 25; | 10 var LAYOUT_SPACING_TOP = 25; |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 | 1094 |
1095 function isDoneLoading() { | 1095 function isDoneLoading() { |
1096 return !document.body.classList.contains('loading'); | 1096 return !document.body.classList.contains('loading'); |
1097 } | 1097 } |
1098 | 1098 |
1099 // Initialize the apps promo. | 1099 // Initialize the apps promo. |
1100 document.addEventListener('DOMContentLoaded', function() { | 1100 document.addEventListener('DOMContentLoaded', function() { |
1101 var promoText1 = $('apps-promo-text1'); | 1101 var promoText1 = $('apps-promo-text1'); |
1102 promoText1.innerHTML = promoText1.textContent; | 1102 promoText1.innerHTML = promoText1.textContent; |
1103 promoText1.querySelector('a').href = localStrings.getString('web_store_url'); | 1103 promoText1.querySelector('a').href = localStrings.getString('web_store_url'); |
| 1104 |
| 1105 $('apps-promo-hide').addEventListener('click', function() { |
| 1106 chrome.send('hideAppsPromo', []); |
| 1107 document.documentElement.classList.remove('apps-promo-visible'); |
| 1108 layoutSections(); |
| 1109 }); |
1104 }); | 1110 }); |
OLD | NEW |