mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-app-adblock: sync with adblock 4.4.3-1
Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -6,9 +6,10 @@ include $(TOPDIR)/rules.mk
|
|||||||
LUCI_TITLE:=LuCI support for Adblock
|
LUCI_TITLE:=LuCI support for Adblock
|
||||||
LUCI_DEPENDS:=+luci-base +adblock
|
LUCI_DEPENDS:=+luci-base +adblock
|
||||||
|
|
||||||
|
PKG_VERSION:=4.4.3
|
||||||
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>, \
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
Dirk Brenken <dev@brenken.org>
|
|
||||||
|
|
||||||
include ../../luci.mk
|
include ../../luci.mk
|
||||||
|
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ return view.extend({
|
|||||||
'class': 'btn cbi-button cbi-button-positive',
|
'class': 'btn cbi-button cbi-button-positive',
|
||||||
'style': 'word-break: inherit',
|
'style': 'word-break: inherit',
|
||||||
'name': 'allowlist',
|
'name': 'allowlist',
|
||||||
|
'title': 'Add to Allowlist',
|
||||||
'value': content[0].requests[i].domain,
|
'value': content[0].requests[i].domain,
|
||||||
'click': handleAction
|
'click': handleAction
|
||||||
}, [_('Allowlist...')]);
|
}, [_('Allowlist...')]);
|
||||||
@@ -333,6 +334,7 @@ return view.extend({
|
|||||||
'class': 'btn cbi-button cbi-button-negative',
|
'class': 'btn cbi-button cbi-button-negative',
|
||||||
'style': 'word-break: inherit',
|
'style': 'word-break: inherit',
|
||||||
'name': 'blocklist',
|
'name': 'blocklist',
|
||||||
|
'title': 'Add to Blocklist',
|
||||||
'value': content[0].requests[i].domain,
|
'value': content[0].requests[i].domain,
|
||||||
'click': handleAction
|
'click': handleAction
|
||||||
}, [_('Blocklist...')]);
|
}, [_('Blocklist...')]);
|
||||||
@@ -384,10 +386,20 @@ return view.extend({
|
|||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'cbi-page-actions' }, [
|
E('div', { 'class': 'cbi-page-actions' }, [
|
||||||
|
E('button', {
|
||||||
|
'class': 'btn cbi-button cbi-button-apply',
|
||||||
|
'style': 'float:none;margin-right:.4em;',
|
||||||
|
'id': 'btnTest',
|
||||||
|
'title': 'Adblock Test',
|
||||||
|
'click': function() {
|
||||||
|
window.open('https://adblock.turtlecute.org/', '_blank', 'noopener,noreferrer');
|
||||||
|
}
|
||||||
|
}, [_('Adblock Test')]),
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-apply',
|
'class': 'btn cbi-button cbi-button-apply',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btnMap',
|
'id': 'btnMap',
|
||||||
|
'title': 'Map',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
if (content[1] && content[1].length > 1) {
|
if (content[1] && content[1].length > 1) {
|
||||||
@@ -401,10 +413,11 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [_('Map...')]),
|
}, [_('Map')]),
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-apply',
|
'class': 'btn cbi-button cbi-button-apply',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
|
'title': 'Blocklist Query',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleAction('query');
|
return handleAction('query');
|
||||||
})
|
})
|
||||||
@@ -412,6 +425,7 @@ return view.extend({
|
|||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-positive important',
|
'class': 'btn cbi-button cbi-button-positive important',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
|
'title': 'Refresh',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleAction('refresh');
|
return handleAction('refresh');
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ return view.extend({
|
|||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btnDownload',
|
'id': 'btnDownload',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
|
'title': 'Download',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleEdit('download');
|
return handleEdit('download');
|
||||||
})
|
})
|
||||||
@@ -258,6 +259,7 @@ return view.extend({
|
|||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btnUpload',
|
'id': 'btnUpload',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
|
'title': 'Upload',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleEdit('upload');
|
return handleEdit('upload');
|
||||||
})
|
})
|
||||||
@@ -267,6 +269,7 @@ return view.extend({
|
|||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btnCreate',
|
'id': 'btnCreate',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
|
'title': 'Fill',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleEdit('create');
|
return handleEdit('create');
|
||||||
})
|
})
|
||||||
@@ -276,6 +279,7 @@ return view.extend({
|
|||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btnClear',
|
'id': 'btnClear',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
|
'title': 'Clear',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleEdit('clear');
|
return handleEdit('clear');
|
||||||
})
|
})
|
||||||
@@ -285,6 +289,7 @@ return view.extend({
|
|||||||
'style': 'float:none',
|
'style': 'float:none',
|
||||||
'id': 'btnSave',
|
'id': 'btnSave',
|
||||||
'disabled': 'disabled',
|
'disabled': 'disabled',
|
||||||
|
'title': 'Save',
|
||||||
'click': ui.createHandlerFn(this, function () {
|
'click': ui.createHandlerFn(this, function () {
|
||||||
return handleEdit('save');
|
return handleEdit('save');
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -231,10 +231,10 @@ return view.extend({
|
|||||||
o.datatype = 'range(1,300)';
|
o.datatype = 'range(1,300)';
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
|
|
||||||
o = s.taboption('general', form.Flag, 'adb_dnsforce', _('Force Local DNS'), _('Redirect all DNS queries from specified zones to the local DNS resolver, applies to UDP and TCP protocol.'));
|
o = s.taboption('general', form.Flag, 'adb_dnsforce', _('Force Local DNS'), _('Redirect all local DNS queries from specified LAN zones to the local DNS resolver, applies to UDP and TCP protocol.'));
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
o = s.taboption('general', widgets.ZoneSelect, 'adb_zonelist', _('Forced Zones'), _('Firewall source zones that should be forced locally.'));
|
o = s.taboption('general', widgets.ZoneSelect, 'adb_zonelist', _('Forced Zones'), _('Firewall LAN source zones that should be forced locally.'));
|
||||||
o.depends('adb_dnsforce', '1');
|
o.depends('adb_dnsforce', '1');
|
||||||
o.multiple = true;
|
o.multiple = true;
|
||||||
o.nocreate = true;
|
o.nocreate = true;
|
||||||
@@ -398,10 +398,6 @@ return view.extend({
|
|||||||
o.default = '<em style="color:#37c;font-weight:bold;">' + _('Changes on this tab needs an adblock service restart to take effect.') + '</em>'
|
o.default = '<em style="color:#37c;font-weight:bold;">' + _('Changes on this tab needs an adblock service restart to take effect.') + '</em>'
|
||||||
+ '<hr style="width: 200px; height: 1px;" />';
|
+ '<hr style="width: 200px; height: 1px;" />';
|
||||||
|
|
||||||
o = s.taboption('adv_report', form.DummyValue, '_sub');
|
|
||||||
o.rawhtml = true;
|
|
||||||
o.default = '<em><b>Changes on this tab needs a full adblock service restart to take effect.</b></em>';
|
|
||||||
|
|
||||||
o = s.taboption('adv_report', widgets.DeviceSelect, 'adb_repiface', _('Report Interface'), _('List of available network devices used by tcpdump.'));
|
o = s.taboption('adv_report', widgets.DeviceSelect, 'adb_repiface', _('Report Interface'), _('List of available network devices used by tcpdump.'));
|
||||||
o.nocreate = false;
|
o.nocreate = false;
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
@@ -566,6 +562,7 @@ return view.extend({
|
|||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-negative important',
|
'class': 'btn cbi-button cbi-button-negative important',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
|
'title': 'Stop',
|
||||||
'click': function () {
|
'click': function () {
|
||||||
return handleAction('stop');
|
return handleAction('stop');
|
||||||
}
|
}
|
||||||
@@ -574,6 +571,7 @@ return view.extend({
|
|||||||
'class': 'btn cbi-button cbi-button-apply important',
|
'class': 'btn cbi-button cbi-button-apply important',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
'id': 'btn_suspend',
|
'id': 'btn_suspend',
|
||||||
|
'title': 'Suspend/Resume',
|
||||||
'click': function () {
|
'click': function () {
|
||||||
return handleAction('suspend');
|
return handleAction('suspend');
|
||||||
}
|
}
|
||||||
@@ -581,6 +579,7 @@ return view.extend({
|
|||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-positive important',
|
'class': 'btn cbi-button cbi-button-positive important',
|
||||||
'style': 'float:none;margin-right:.4em;',
|
'style': 'float:none;margin-right:.4em;',
|
||||||
|
'title': 'Save & Reload',
|
||||||
'click': function () {
|
'click': function () {
|
||||||
return handleAction('reload');
|
return handleAction('reload');
|
||||||
}
|
}
|
||||||
@@ -588,6 +587,7 @@ return view.extend({
|
|||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button cbi-button-positive important',
|
'class': 'btn cbi-button cbi-button-positive important',
|
||||||
'style': 'float:none',
|
'style': 'float:none',
|
||||||
|
'title': 'Save & Restart',
|
||||||
'click': function () {
|
'click': function () {
|
||||||
handleAction('restart');
|
handleAction('restart');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user