mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 10:51:51 +00:00
luci-app-adblock: update 4.5.3-2
* ESlint fixes Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -66,4 +66,4 @@ return view.extend({
|
||||
|
||||
handleSaveApply: null,
|
||||
handleReset: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -66,4 +66,4 @@ return view.extend({
|
||||
|
||||
handleSaveApply: null,
|
||||
handleReset: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
});
|
||||
});
|
||||
|
||||
@@ -73,4 +73,4 @@ function Logview(logtag, name) {
|
||||
});
|
||||
}
|
||||
|
||||
return L.Class.extend({ Logview });
|
||||
return L.Class.extend({ Logview });
|
||||
|
||||
@@ -848,4 +848,4 @@ return view.extend({
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user