mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 21:24:35 +04:00
luci-app-adblock: sync with adblock 4.4.5-1
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit ce3e393ec2)
This commit is contained in:
@@ -6,8 +6,8 @@ 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.4
|
PKG_VERSION:=4.4.5
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
|
||||||
|
|||||||
@@ -215,11 +215,10 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
o = s.option(form.Value, 'rule', _('Rule'));
|
o = s.option(form.Value, 'rule', _('Rule'));
|
||||||
o.value('/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($1)}', _('<DOMAIN> excl. TLDs'));
|
o.value('feed 1', _('<Domain>'));
|
||||||
o.value('/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($1)}', _('<DOMAIN> incl. TLDs'));
|
o.value('feed 127.0.0.1 2', _('127.0.0.1 <Domain>'));
|
||||||
o.value('/^(127\\.0\\.0\\.1 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($2)}', _('127.0.0.1<SPACE><DOMAIN>'));
|
o.value('feed 0.0.0.0 2', _('0.0.0.0 <Domain>'));
|
||||||
o.value('/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($2)}', _('0.0.0.0<SPACE><DOMAIN>'));
|
o.value('feed 3 [|^]', _('<Adblock Plus Syntax>'));
|
||||||
o.value('BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}\\^(\\$third-party)?$/{print tolower($3)}', _('<ADBLOCK-PLUS>'));
|
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ function Logview(logtag, name) {
|
|||||||
const logEl = document.getElementById('logfile');
|
const logEl = document.getElementById('logfile');
|
||||||
if (!logEl) return;
|
if (!logEl) return;
|
||||||
|
|
||||||
const entries = res?.log ?? [];
|
const filtered = (res?.log ?? [])
|
||||||
if (entries.length > 0) {
|
|
||||||
const filtered = entries
|
|
||||||
.filter(entry => !logtag || entry.msg.includes(logtag))
|
.filter(entry => !logtag || entry.msg.includes(logtag))
|
||||||
.map(entry => {
|
.map(entry => {
|
||||||
const d = new Date(entry.time);
|
const d = new Date(entry.time);
|
||||||
@@ -37,6 +35,7 @@ function Logview(logtag, name) {
|
|||||||
});
|
});
|
||||||
return `[${date}-${time}] ${entry.msg}`;
|
return `[${date}-${time}] ${entry.msg}`;
|
||||||
});
|
});
|
||||||
|
if (filtered.length > 0) {
|
||||||
logEl.value = filtered.join('\n');
|
logEl.value = filtered.join('\n');
|
||||||
} else {
|
} else {
|
||||||
logEl.value = _('No %s related logs yet!').format(name);
|
logEl.value = _('No %s related logs yet!').format(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user