Allow only one bookmark to be added for multiple fast starring
[chromium-blink-merge.git] / chrome / browser / resources / feedback / js / topbar_handlers.js
blob793e0e5e16b1e4cc3a47a44338934d6fd1e93a2a
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /**
6 * Setup handlers for the minimize and close topbar buttons.
7 */
8 function initializeHandlers() {
9 $('minimize-button').addEventListener('click', function(e) {
10 e.preventDefault();
11 chrome.app.window.current().minimize();
12 });
14 $('minimize-button').addEventListener('mousedown', function(e) {
15 e.preventDefault();
16 });
18 $('close-button').addEventListener('click', function() {
19 window.close();
20 });
22 $('close-button').addEventListener('mousedown', function(e) {
23 e.preventDefault();
24 });
27 window.addEventListener('DOMContentLoaded', initializeHandlers);