OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 (function() { | |
6 | |
7 'use strict'; | |
8 | |
9 /** @param {Event} event */ | |
10 function onClick(event) { | |
11 var element = /** @type {HTMLElement} */ (event.target); | |
12 if (element.classList.contains('toggle-licence')) { | |
13 element.parentElement.parentElement.classList.toggle('selected'); | |
14 document.body.classList.toggle('show-only-selected'); | |
15 } | |
16 } | |
17 | |
18 document.addEventListener('click', onClick, false); | |
19 | |
20 })(); | |
OLD | NEW |