luci-app-adblock: update 4.5.3-2

* ESlint fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2026-03-16 19:01:14 +01:00
parent 1b47d9c353
commit 61f643610d
7 changed files with 11 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Adblock
LUCI_DEPENDS:=+luci-base +luci-lib-uqr +adblock
PKG_VERSION:=4.5.3
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@@ -66,4 +66,4 @@ return view.extend({
handleSaveApply: null,
handleReset: null
});
});

View File

@@ -66,4 +66,4 @@ return view.extend({
handleSaveApply: null,
handleReset: null
});
});

View File

@@ -31,7 +31,7 @@ function handleAction(ev) {
'click': ui.createHandlerFn(this, function (ev) {
L.resolveDefault(fs.read_direct('/etc/adblock/adblock.blocklist'), '')
.then(function (res) {
const domain = document.getElementById('blocklist').value.trim().toLowerCase().replace(/[^a-z0-9.\-]/g, '');
const domain = document.getElementById('blocklist').value.trim().toLowerCase().replace(/[^a-z0-9.-]/g, '');
const pattern = new RegExp('^' + domain.replace(/[.]/g, '\\.') + '$', 'm');
if (res.search(pattern) === -1) {
const blocklist = res + domain + '\n';
@@ -69,7 +69,7 @@ function handleAction(ev) {
'click': ui.createHandlerFn(this, function (ev) {
L.resolveDefault(fs.read_direct('/etc/adblock/adblock.allowlist'), '')
.then(function (res) {
const domain = document.getElementById('allowlist').value.trim().toLowerCase().replace(/[^a-z0-9.\-]/g, '');
const domain = document.getElementById('allowlist').value.trim().toLowerCase().replace(/[^a-z0-9.-]/g, '');
const pattern = new RegExp('^' + domain.replace(/[.]/g, '\\.') + '$', 'm');
if (res.search(pattern) === -1) {
const allowlist = res + domain + '\n';
@@ -122,7 +122,7 @@ function handleAction(ev) {
E('button', {
'class': 'btn cbi-button-action',
'click': ui.createHandlerFn(this, function (ev) {
const domain = document.getElementById('search').value.trim().toLowerCase().replace(/[^a-z0-9.\-]/g, '');
const domain = document.getElementById('search').value.trim().toLowerCase().replace(/[^a-z0-9.-]/g, '');
if (domain) {
document.getElementById('run').classList.add("spinning");
document.getElementById('search').value = domain;
@@ -549,4 +549,4 @@ return view.extend({
handleSaveApply: null,
handleSave: null,
handleReset: null
});
});

View File

@@ -211,7 +211,7 @@ return view.extend({
if (!value) {
return true;
}
if (!value.match(/^https?:\/\/[A-Za-z0-9\[\]\/.\-?&+_@%=:~#]+$/)) {
if (!value.match(/^https?:\/\/[A-Za-z0-9[\]/.?&+_@%=:~#-]+$/)) {
return _('Protocol/URL format not supported');
}
return true;
@@ -303,4 +303,4 @@ return view.extend({
handleSaveApply: null,
handleSave: null,
handleReset: null
});
});

View File

@@ -73,4 +73,4 @@ function Logview(logtag, name) {
});
}
return L.Class.extend({ Logview });
return L.Class.extend({ Logview });

View File

@@ -848,4 +848,4 @@ return view.extend({
handleSaveApply: null,
handleSave: null,
handleReset: null
});
});