summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/ntp/apps.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/ntp/apps.js')
-rw-r--r--chrome/browser/resources/ntp/apps.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 64b490f..41c2e6e 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -5,14 +5,26 @@
function getAppsCallback(data) {
logEvent('recieved apps');
var appsSection = $('apps-section');
- var appsSectionContent = $('apps-section-content');
- appsSectionContent.textContent = '';
+ var debugSection = $('debug');
+ appsSection.textContent = '';
data.apps.forEach(function(app) {
- appsSectionContent.appendChild(apps.createElement(app));
+ appsSection.appendChild(apps.createElement(app));
});
- appsSectionContent.appendChild(apps.createWebStoreElement());
+ // TODO(aa): Figure out what to do with the debug mode when we turn apps on
+ // for everyone.
+ if (appsSection.hasChildNodes()) {
+ appsSection.classList.remove('disabled');
+ if (data.showDebugLink) {
+ debugSection.classList.remove('disabled');
+ }
+
+ appsSection.appendChild(apps.createWebStoreElement());
+ } else {
+ appsSection.classList.add('disabled');
+ debugSection.classList.add('disabled');
+ }
}
var apps = {