luci-app-adblock: sync with adblock 4.4.5-1

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2025-12-14 07:11:19 +01:00
parent 66d0d6eeda
commit ce3e393ec2
3 changed files with 24 additions and 26 deletions

View File

@@ -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>

View File

@@ -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;

View File

@@ -18,25 +18,24 @@ 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) { .filter(entry => !logtag || entry.msg.includes(logtag))
const filtered = entries .map(entry => {
.filter(entry => !logtag || entry.msg.includes(logtag)) const d = new Date(entry.time);
.map(entry => { const date = d.toLocaleDateString([], {
const d = new Date(entry.time); year: 'numeric',
const date = d.toLocaleDateString([], { month: '2-digit',
year: 'numeric', day: '2-digit'
month: '2-digit', });
day: '2-digit' const time = d.toLocaleTimeString([], {
}); hour: '2-digit',
const time = d.toLocaleTimeString([], { minute: '2-digit',
hour: '2-digit', second: '2-digit',
minute: '2-digit', hour12: false
second: '2-digit', });
hour12: false 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);