Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: content/browser/resources/media/new/collapse.js

Issue 18889006: Removed old media-internals page and rewrote it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved all 'new' media internals files into its own folder for a smooth transition. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/resources/media/new/gen_logs.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5
6 /**
7 * @fileoverview Sets up the event handlers for the collapsing containers
8 */
9
10 (function () {
11 "use strict";
12 var allCollapseDivs = document.querySelectorAll('.collapse');
13 (Array.prototype.slice.call(allCollapseDivs)).forEach(function (elem) {
14 // find the header for the div, because we only want to trigger on that
15 var header = elem.querySelector("h2");
16 header.onclick = function () {
17 var wasOpen = elem.className.indexOf("open") !== -1;
18
19 if (wasOpen) {
20 elem.className = "collapse closed";
21 } else {
22 elem.className = "collapse open";
23 }
24 };
25 });
26
27 }());
OLDNEW
« no previous file with comments | « no previous file | content/browser/resources/media/new/gen_logs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698