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

Unified Diff: options/privacy.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
« files/sources.js ('K') | « options/other.js ('k') | options/time.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options/privacy.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/options/privacy.js
@@ -0,0 +1,44 @@
+var privacyParent = document.getElementById('privacy');
+
+var section = document.createElement('h2');
+section.appendChild(document.createTextNode(translate.get('privacy_lists')));
+privacyParent.appendChild(section);
+
+section = document.createElement('div');
+section.setAttribute('class', 'section');
+for(key in sources.privacy) {
+ var br = document.createElement('br');
+ var label = document.createElement('label');
+ label.setAttribute('id', key);
+
+ var checkbox = document.createElement('input');
+ checkbox.setAttribute('type', 'checkbox');
+ checkbox.setAttribute('name', key);
+ checkbox.setAttribute('id', key + '-check');
+ checkbox.setAttribute('value', preferences.bool(key));
+ //checkbox.setAttribute('onClick', 'listClick("' + key + '")');
+ //checkbox.checked = lists.status(key);
+
+ label.appendChild(checkbox);
+ var text = document.createElement('span');
+ text.appendChild(document.createTextNode(sources.name(key) + ' '));
+ label.appendChild(text);
+ if(sources.style[key] == 'opera') {
+ var icon = document.createElement('img');
+ icon.setAttribute('src', '/images/opera_small.png');
+ label.appendChild(icon);
+ }
+ if(sources.url(key).match(/^https/)) {
+ var icon = document.createElement('img');
+ icon.setAttribute('src', '/images/secure.png');
+ label.appendChild(icon);
+ }
+ var time = document.createElement('i');
+ time.setAttribute('class', 'update_time');
+ label.appendChild(time);
+ section.appendChild(label);
+ section.appendChild(br);
+}
+privacyParent.appendChild(section);
+
+//Uses listClick from lists.js
« files/sources.js ('K') | « options/other.js ('k') | options/time.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld