68c6644fb391d97db10ff6c7bf0453e41edf0115
8 return L
.resolveDefault(fs
.read_direct('/etc/adblock/adblock.whitelist'), '');
10 handleSave: function(ev
) {
11 var value
= ((document
.querySelector('textarea').value
|| '').trim().toLowerCase().replace(/\r\n/g, '\n').replace(/[^a-z0-9\.\-\#\n]/g, '')) + '\n';
12 return fs
.write('/etc/adblock/adblock.whitelist', value
)
14 document
.querySelector('textarea').value
= value
;
15 ui
.addNotification(null, E('p', _('Whitelist changes have been saved. Refresh your adblock lists that changes take effect.')), 'info');
16 }).catch(function(e
) {
17 ui
.addNotification(null, E('p', _('Unable to save changes: %s').format(e
.message
)));
20 render: function(whitelist
) {
23 _('This is the local adblock whitelist to always allow certain (sub) domains.<br /> \
24 Please note: add only one domain per line. Comments introduced with \'#\' are allowed - ip addresses, wildcards and regex are not.')),
27 'style': 'width: 100% !important; padding: 5px; font-family: monospace',
28 'spellcheck': 'false',
31 }, [ whitelist
!= null ? whitelist
: '' ])
35 handleSaveApply
: null,