luci-app-adblock: sync with adblock-4.2.1
authorDirk Brenken <redacted>
Sun, 11 Aug 2024 07:37:22 +0000 (09:37 +0200)
committerDirk Brenken <redacted>
Sun, 11 Aug 2024 07:37:22 +0000 (09:37 +0200)
* added full 1Hosts support

Signed-off-by: Dirk Brenken <redacted>
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js
applications/luci-app-adblock/po/templates/adblock.pot

index da93bc38a082420d3b8fa2f997058e469d04c7dc..042e7dcb11fd14cfa9fdb9a331a63c46b2cff0bc 100644 (file)
@@ -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 = '<em><b>1Hosts List Selection</b></em>';
+
+               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
index ee3d7317f0e25671e1b7d9673db7c4e60bf2cf20..21403b15428a4dbb22c5dc572e0ccd9792e2fd04 100644 (file)
@@ -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 ""
 
git clone https://git.99rst.org/PROJECT