| 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); |