Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: about/license.js

Issue 8493027: Acquired Opera AdBlock code (Closed)
Patch Set: Created Oct. 2, 2012, 1:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 var licenseParent = document.getElementById('license');
2
3 var title = document.createElement('h2');
4 title.appendChild(document.createTextNode(translate.get('licenses')));
5 licenseParent.appendChild(title);
6
7 function createItem(section, key, css) {
8 var element = document.createElement('p');
9
10 var link = document.createElement('a');
11 if(css)
12 link.href = sources.css[key];
13 else
14 link.href = sources.url(key);
15 link.appendChild(document.createTextNode(sources.name(key)));
16 element.appendChild(link);
17
18 element.innerHTML += translate.substring(': ' + sources.license[key]);
19 section.appendChild(element);
20 }
21
22 var section = document.createElement('h3');
23 section.appendChild(document.createTextNode('Fanboy'));
24 licenseParent.appendChild(section);
25
26 section = document.createElement('div');
27 for(key in sources.fanboy) {
28 createItem(section, key, false)
29 }
30 licenseParent.appendChild(section);
31
32 section = document.createElement('h3');
33 section.appendChild(document.createTextNode('EasyList'));
34 licenseParent.appendChild(section);
35
36 section = document.createElement('div');
37 for(key in sources.easy) {
38 createItem(section, key, false)
39 }
40 licenseParent.appendChild(section);
41
42 section = document.createElement('h3');
43 section.appendChild(document.createTextNode(translate.get('other_lists')));
44 licenseParent.appendChild(section);
45
46 section = document.createElement('div');
47 for(key in sources.others) {
48 createItem(section, key, false)
49 }
50 licenseParent.appendChild(section);
51
52 section = document.createElement('h3');
53 section.appendChild(document.createTextNode(translate.get('privacy_lists')));
54 licenseParent.appendChild(section);
55
56 section = document.createElement('div');
57 for(key in sources.privacy) {
58 createItem(section, key, false)
59 }
60 licenseParent.appendChild(section);
61
62 section = document.createElement('h3');
63 section.appendChild(document.createTextNode(translate.get('css_filter')));
64 licenseParent.appendChild(section);
65
66 section = document.createElement('div');
67 for(key in sources.css) {
68 createItem(section, key, true)
69 }
70 licenseParent.appendChild(section);
OLDNEW
« no previous file with comments | « about/extension.js ('k') | about/thanks.js » ('j') | files/background.js » ('J')

Powered by Google App Engine
This is Rietveld