From 257cfac4257571581bd32430757c94a783d4e1e5 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 9 Aug 2024 17:16:09 +0200 Subject: [PATCH] luci-app-adblock: sync with adblock-4.2.0 * add hagezi support Signed-off-by: Dirk Brenken --- .../resources/view/adblock/overview.js | 16 ++++++++++++++++ .../luci-app-adblock/po/templates/adblock.pot | 1 + 2 files changed, 17 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 846689e945c4..da93bc38a082 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 @@ -593,6 +593,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 diff --git a/applications/luci-app-adblock/po/templates/adblock.pot b/applications/luci-app-adblock/po/templates/adblock.pot index c79653e5ed5e..ee3d7317f0e2 100644 --- a/applications/luci-app-adblock/po/templates/adblock.pot +++ b/applications/luci-app-adblock/po/templates/adblock.pot @@ -726,6 +726,7 @@ msgid "Unable to save changes: %s" msgstr "" #: applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js:584 +#: applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js:600 msgid "Variants" msgstr ""