From 05378ce2ec2ef0d63feac1620ee26bffe6412811 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sun, 11 Aug 2024 09:46:07 +0200 Subject: [PATCH] luci-app-adblock: sync with adblock-4.2.0 * add hagezi support Signed-off-by: Dirk Brenken (cherry picked from commit 257cfac4257571581bd32430757c94a783d4e1e5) Signed-off-by: Dirk Brenken --- .../resources/view/adblock/overview.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js index 9b0aa5bc0d..744d2d51b6 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js @@ -597,6 +597,22 @@ return view.extend({ o.optional = true; o.rmempty = true; + o = s.taboption('sources', form.DummyValue, '_sub'); + o.rawhtml = true; + o.default = 'Hagezi List Selection'; + + o = s.taboption('sources', form.DynamicList, 'adb_hag_sources', _('Variants')); + for (var i = 0; i < categories.length; i++) { + code = categories[i].match(/^(\w+);/)[1].trim(); + if (code === 'hag') { + list = categories[i].match(/^\w+;(.*);/)[1].trim(); + path = categories[i].match(/^.*;(.*$)/)[1].trim(); + o.value(path, list); + } + } + o.optional = true; + o.rmempty = true; + return m.render(); }, handleReset: null -- 2.30.2