OLD | NEW |
(Empty) | |
| 1 var privacyParent = document.getElementById('privacy'); |
| 2 |
| 3 var section = document.createElement('h2'); |
| 4 section.appendChild(document.createTextNode(translate.get('privacy_lists'))); |
| 5 privacyParent.appendChild(section); |
| 6 |
| 7 section = document.createElement('div'); |
| 8 section.setAttribute('class', 'section'); |
| 9 for(key in sources.privacy) { |
| 10 var br = document.createElement('br'); |
| 11 var label = document.createElement('label'); |
| 12 label.setAttribute('id', key); |
| 13 |
| 14 var checkbox = document.createElement('input'); |
| 15 checkbox.setAttribute('type', 'checkbox'); |
| 16 checkbox.setAttribute('name', key); |
| 17 checkbox.setAttribute('id', key + '-check'); |
| 18 checkbox.setAttribute('value', preferences.bool(key)); |
| 19 //checkbox.setAttribute('onClick', 'listClick("' + key + '")'); |
| 20 //checkbox.checked = lists.status(key); |
| 21 |
| 22 label.appendChild(checkbox); |
| 23 var text = document.createElement('span'); |
| 24 text.appendChild(document.createTextNode(sources.name(key) + ' ')); |
| 25 label.appendChild(text); |
| 26 if(sources.style[key] == 'opera') { |
| 27 var icon = document.createElement('img'); |
| 28 icon.setAttribute('src', '/images/opera_small.png'); |
| 29 label.appendChild(icon); |
| 30 } |
| 31 if(sources.url(key).match(/^https/)) { |
| 32 var icon = document.createElement('img'); |
| 33 icon.setAttribute('src', '/images/secure.png'); |
| 34 label.appendChild(icon); |
| 35 } |
| 36 var time = document.createElement('i'); |
| 37 time.setAttribute('class', 'update_time'); |
| 38 label.appendChild(time); |
| 39 section.appendChild(label); |
| 40 section.appendChild(br); |
| 41 } |
| 42 privacyParent.appendChild(section); |
| 43 |
| 44 //Uses listClick from lists.js |
OLD | NEW |