1 // Copyright (c) 2011 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.
5 function $(id) { return document.getElementById(id); }
8 var licence = o.nextSibling;
10 while (licence.className != 'licence') {
11 if (!licence) return false;
12 licence = licence.nextSibling;
15 if (licence.style && licence.style.display == 'block') {
16 licence.style.display = 'none';
17 o.textContent = 'show license';
19 licence.style.display = 'block';
20 o.textContent = 'hide license';
25 document.addEventListener('DOMContentLoaded', function() {
27 var keyboardUtils = document.createElement('script');
28 keyboardUtils.src = 'chrome://credits/keyboard_utils.js';
29 document.body.appendChild(keyboardUtils);
32 var links = document.querySelectorAll('a.show');
33 for (var i = 0; i < links.length; ++i) {
34 links[i].onclick = function() { return toggle(this); };
37 $('print-link').onclick = function() {