| Index: chrome/common/extensions/docs/static/js/platform_chooser.js
|
| diff --git a/chrome/common/extensions/docs/static/js/platform_chooser.js b/chrome/common/extensions/docs/static/js/platform_chooser.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fe1540e7fb0972ab62d88bd30366190ade4c3857
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/docs/static/js/platform_chooser.js
|
| @@ -0,0 +1,18 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Intializes the platform chooser, the widget in the top left corner with the
|
| +// 'Apps...Extensions' dropdown.
|
| +(function() {
|
| +
|
| +var platformChooser = document.getElementById('platform-chooser-popup');
|
| +Array.prototype.forEach.call(platformChooser.getElementsByTagName('button'),
|
| + function(button) {
|
| + button.addEventListener('click', function(event) {
|
| + window.location.assign(button.getAttribute('data-href'));
|
| + event.stopPropagation();
|
| + });
|
| +});
|
| +
|
| +})()
|
|
|