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