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 $(o) {return document.getElementById(o);}
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.innerHTML = 'show license';
19 licence.style.display = 'block';
20 o.innerHTML = 'hide license';
25 document.body.onload = function () {
26 var links = document.getElementsByTagName("a");
27 for (var i = 0; i < links.length; i++) {
28 if (links[i].className === "show") {
29 links[i].onclick = function () { return toggle(this); };
33 $("print-link").onclick = function () {