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

Unified Diff: about/license.js

Issue 8493027: Acquired Opera AdBlock code (Closed)
Patch Set: Created Oct. 2, 2012, 1:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « about/extension.js ('k') | about/thanks.js » ('j') | files/background.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: about/license.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/about/license.js
@@ -0,0 +1,70 @@
+var licenseParent = document.getElementById('license');
+
+var title = document.createElement('h2');
+title.appendChild(document.createTextNode(translate.get('licenses')));
+licenseParent.appendChild(title);
+
+function createItem(section, key, css) {
+ var element = document.createElement('p');
+
+ var link = document.createElement('a');
+ if(css)
+ link.href = sources.css[key];
+ else
+ link.href = sources.url(key);
+ link.appendChild(document.createTextNode(sources.name(key)));
+ element.appendChild(link);
+
+ element.innerHTML += translate.substring(': ' + sources.license[key]);
+ section.appendChild(element);
+}
+
+var section = document.createElement('h3');
+section.appendChild(document.createTextNode('Fanboy'));
+licenseParent.appendChild(section);
+
+section = document.createElement('div');
+for(key in sources.fanboy) {
+ createItem(section, key, false)
+}
+licenseParent.appendChild(section);
+
+section = document.createElement('h3');
+section.appendChild(document.createTextNode('EasyList'));
+licenseParent.appendChild(section);
+
+section = document.createElement('div');
+for(key in sources.easy) {
+ createItem(section, key, false)
+}
+licenseParent.appendChild(section);
+
+section = document.createElement('h3');
+section.appendChild(document.createTextNode(translate.get('other_lists')));
+licenseParent.appendChild(section);
+
+section = document.createElement('div');
+for(key in sources.others) {
+ createItem(section, key, false)
+}
+licenseParent.appendChild(section);
+
+section = document.createElement('h3');
+section.appendChild(document.createTextNode(translate.get('privacy_lists')));
+licenseParent.appendChild(section);
+
+section = document.createElement('div');
+for(key in sources.privacy) {
+ createItem(section, key, false)
+}
+licenseParent.appendChild(section);
+
+section = document.createElement('h3');
+section.appendChild(document.createTextNode(translate.get('css_filter')));
+licenseParent.appendChild(section);
+
+section = document.createElement('div');
+for(key in sources.css) {
+ createItem(section, key, true)
+}
+licenseParent.appendChild(section);
« 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