OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Allow platform specific CSS rules. | 5 // Allow platform specific CSS rules. |
6 // | 6 // |
7 // TODO(akalin): BMM and options page does something similar, too. | 7 // TODO(akalin): BMM and options page does something similar, too. |
8 // Move this to util.js. | 8 // Move this to util.js. |
9 if (cr.isWindows) | 9 if (cr.isWindows) |
10 document.documentElement.setAttribute('os', 'win'); | 10 document.documentElement.setAttribute('os', 'win'); |
11 | 11 |
12 cr.ui.decorate('tabbox', cr.ui.TabBox); | 12 cr.ui.decorate('tabbox', cr.ui.TabBox); |
| 13 |
| 14 cr.define('chrome.sync.index', function() { |
| 15 function setUserEventsTabVisibility(visible) { |
| 16 $('sync-user-events-tab').hidden = !visible; |
| 17 } |
| 18 |
| 19 function onLoad() { |
| 20 chrome.sync.userEventsVisibilityCallback = setUserEventsTabVisibility; |
| 21 chrome.sync.requestUserEventsVisibility(); |
| 22 } |
| 23 |
| 24 return { |
| 25 onLoad: onLoad |
| 26 }; |
| 27 }); |
| 28 |
| 29 document.addEventListener('DOMContentLoaded', chrome.sync.index.onLoad, false); |
OLD | NEW |