Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/resources/about_credits.js

Issue 7215034: Apply CSP to chrome: and about: pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/predictor_api.cc ('k') | chrome/browser/resources/about_credits.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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.
4
5 function $(o) {return document.getElementById(o);}
6
7 function toggle(o) {
8 var licence = o.nextSibling;
9
10 while (licence.className != 'licence') {
11 if (!licence) return false;
12 licence = licence.nextSibling;
13 }
14
15 if (licence.style && licence.style.display == 'block') {
16 licence.style.display = 'none';
17 o.innerHTML = 'show license';
18 } else {
19 licence.style.display = 'block';
20 o.innerHTML = 'hide license';
21 }
22 return false;
23 }
24
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); };
30 }
31 }
32
33 $("print-link").onclick = function () {
34 window.print();
35 return false;
36 }
37 };
38
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor_api.cc ('k') | chrome/browser/resources/about_credits.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698