Index: remoting/credits/credits_js.js |
diff --git a/remoting/credits/credits_js.js b/remoting/credits/credits_js.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f3ebd83e0cf2d2d85a35f641fd7f61b60b1855b4 |
--- /dev/null |
+++ b/remoting/credits/credits_js.js |
@@ -0,0 +1,20 @@ |
+// Copyright 2015 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. |
+ |
+(function() { |
+ |
+'use strict'; |
+ |
+/** @param {Event} event */ |
+function onClick(event) { |
+ var element = /** @type {HTMLElement} */ (event.target); |
+ if (element.classList.contains('toggle-licence')) { |
+ element.parentElement.parentElement.classList.toggle('selected'); |
+ document.body.classList.toggle('show-only-selected'); |
+ } |
+} |
+ |
+document.addEventListener('click', onClick, false); |
+ |
+})(); |