Chromium Code Reviews| 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').style.display = visible ? 'block' : 'none'; | |
|
Dan Beam
2017/05/16 22:40:54
$('sync-user-events-tab').hidden = !visible;
skym
2017/05/22 21:55:48
This doesn't work, see https://codereview.chromium
| |
| 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 |