OLD | NEW |
(Empty) | |
| 1 /* Copyright 2016 The Chromium Authors. All Rights Reserved. |
| 2 * |
| 3 * Use of this source code is governed by a BSD-style |
| 4 * license that can be found in the LICENSE file or at |
| 5 * https://developers.google.com/open-source/licenses/bsd |
| 6 */ |
| 7 |
| 8 /** |
| 9 * @fileoverview This file initializes the drop down menu attached |
| 10 * to the signed in user's email address. It utilizes the menu |
| 11 * widget defined in framework-menu.js. |
| 12 */ |
| 13 |
| 14 /** @type {Menu} */ |
| 15 var accountMenu; |
| 16 |
| 17 (function() { |
| 18 var target = document.getElementById('account-menu'); |
| 19 |
| 20 if (!target) { |
| 21 return; |
| 22 } |
| 23 |
| 24 accountMenu = new Menu(target, function() {}); |
| 25 accountMenu.addItem('Switch accounts', CS_env.login_url); |
| 26 accountMenu.addEvent(window, 'load', function() { |
| 27 document.body.appendChild(accountMenu.menu); |
| 28 }); |
| 29 })(); |
| 30 |
OLD | NEW |