From: Dirk Brenken Date: Sun, 11 Aug 2024 07:37:22 +0000 (+0200) Subject: luci-app-adblock: sync with adblock-4.2.1 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=06037ad777ab0500008c49bcb2c06af309bc4e51;p=openwrt-luci.git luci-app-adblock: sync with adblock-4.2.1 * added full 1Hosts support 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 da93bc38a0..042e7dcb11 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 @@ -609,6 +609,22 @@ return view.extend({ o.optional = true; o.rmempty = true; + o = s.taboption('sources', form.DummyValue, '_sub'); + o.rawhtml = true; + o.default = '1Hosts List Selection'; + + o = s.taboption('sources', form.DynamicList, 'adb_hst_sources', _('Variants')); + for (var i = 0; i < categories.length; i++) { + code = categories[i].match(/^(\w+);/)[1].trim(); + if (code === 'hst') { + 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 ee3d7317f0..21403b1542 100644 --- a/applications/luci-app-adblock/po/templates/adblock.pot +++ b/applications/luci-app-adblock/po/templates/adblock.pot @@ -727,6 +727,7 @@ 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 +#: applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js:616 msgid "Variants" msgstr ""