7e053c619259379d9c2f320703e0725be203b3ea
7 return L
.resolveDefault(fs
.read_direct('/etc/adblock/adblock.blacklist'), '');
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.blacklist', value
)
13 document
.querySelector('textarea').value
= value
;
14 ui
.addNotification(null, E('p', _('Blacklist 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(blacklist
) {
22 _('This is the local adblock blacklist to always-deny 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 }, [ blacklist
!= null ? blacklist
: '' ])
33 handleSaveApply
: null,