chromium/remoting/credits/credits_js.js

// Copyright 2015 The Chromium Authors
// 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);

})();