Index: components/sync/driver/resources/sync_index.js |
diff --git a/components/sync/driver/resources/sync_index.js b/components/sync/driver/resources/sync_index.js |
index 7cce623df43f1377c4a570c4278ab508bc8777ee..c6abe3a17ccbc2333a55b9638582a97ff338966d 100644 |
--- a/components/sync/driver/resources/sync_index.js |
+++ b/components/sync/driver/resources/sync_index.js |
@@ -10,3 +10,21 @@ if (cr.isWindows) |
document.documentElement.setAttribute('os', 'win'); |
cr.ui.decorate('tabbox', cr.ui.TabBox); |
+ |
+cr.define('chrome.sync.index', function() { |
+ function setUserEventsTabVisibility(visible) { |
+ var display = visible ? 'block' : 'none'; |
+ document.getElementById('sync-user-events-tab').style.display = display; |
Dan Beam
2017/05/16 03:35:52
can you just use .hidden = true/value instead?
skym
2017/05/16 19:26:49
I'm still learning how these things work, so I mig
Dan Beam
2017/05/22 22:15:49
add this rule somewhere in .css or in a <style> in
skym
2017/05/22 22:55:46
Huh, that's pretty clever. Thanks for the informat
|
+ } |
+ |
+ function onLoad() { |
+ chrome.sync.userEventsVisibilityCallback = setUserEventsTabVisibility; |
+ chrome.sync.requestUserEventsVisibility(); |
+ } |
+ |
+ return { |
+ onLoad: onLoad |
+ }; |
+}); |
+ |
+document.addEventListener('DOMContentLoaded', chrome.sync.index.onLoad, false); |