From: Dirk Brenken Date: Sun, 11 Aug 2024 07:46:07 +0000 (+0200) Subject: luci-app-adblock: sync with adblock-4.2.0 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=05378ce2ec2ef0d63feac1620ee26bffe6412811;p=project%2Fluci.git 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 --- 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