From 70de570f523a32b67836d3a51705af78f62de5dc Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Mon, 8 Jan 2024 01:20:45 +0100 Subject: [PATCH] Okay, let's see how this goes. --- .../AdawayHosts | 2 + .../DandelionSproutsNorskeFiltre.tpl | 2 +- .../NordicFilters-uBOLegacy.txt | 3 +- .../NordicFilters-uMatrixSupplement.txt | 2 +- .../NordicFiltersABP-Inclusion.txt | 3 +- .../NordicFiltersABP.txt | 3 +- .../NordicFiltersAdGuard.txt | 3 +- .../NordicFiltersForMinerBlock.txt | 2 + .../NordicFiltersHostsIPv6.txt | 2 + .../NordicFiltersPiHole.txt | 2 + .../NordicFiltersPrivacy.txt | 3 +- .../NordicFiltersPrivoxy.action | 2 +- .../XYZPrepareFilters.py | 48 +++++++++++++++++++ 13 files changed, 69 insertions(+), 8 deletions(-) diff --git a/NorwegianExperimentalList alternate versions/AdawayHosts b/NorwegianExperimentalList alternate versions/AdawayHosts index 372be9490..37e88a240 100644 --- a/NorwegianExperimentalList alternate versions/AdawayHosts +++ b/NorwegianExperimentalList alternate versions/AdawayHosts @@ -3,6 +3,7 @@ # Version: 07December2023v1 # Users of Pi-Hole FTL 5.22 and later are STRONGLY RECOMMENDED to switch to the || version at https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersAdGuardHome.txt, unless otherwise proven. # Description: This is a slimmer version of "Dandelion Sprout's Nordic Filters", intended for users of software tools that doesn't support adblocker syntaxes. It chiefly targets scams, malware and adverts, on Norwegian, Danish, Icelandic and Faroese websites. +!#if !env_mv3 # Platform notes: This list version is intended for tools that deal with so-called «hosts» system files, including pfBlockerNG, Gas Mask, Diversion, Hosts File Editor, and many others; as well as those who edit their OS' «hosts» system file. # If you use a tool that edits the system's own hosts file, such as Hosts File Editor, Gas Mask, or Magisk Manager, make sure to also use the IPv6 version at https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersHostsIPv6.txt # For mere informasjon og detaljer om denne listen og om andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk @@ -540,3 +541,4 @@ 127.0.0.1 if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data www.if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data +!#endif diff --git a/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl b/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl index 1a55fca6a..f5175e122 100644 --- a/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl +++ b/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl @@ -1,7 +1,7 @@ msFilterList # Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider # Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites -# Version: 03January2023v2-Deprecated +# Version: 04January2023v1-Deprecated : expires = 18 hours # Lisens Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md # Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md diff --git a/NorwegianExperimentalList alternate versions/NordicFilters-uBOLegacy.txt b/NorwegianExperimentalList alternate versions/NordicFilters-uBOLegacy.txt index f44d5bcae..e613ca8c8 100644 --- a/NorwegianExperimentalList alternate versions/NordicFilters-uBOLegacy.txt +++ b/NorwegianExperimentalList alternate versions/NordicFilters-uBOLegacy.txt @@ -1,6 +1,6 @@ ! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for «uBlock Origin Legacy») ! Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites (for «uBlock Origin Legacy») -! Version: 03January2023v2-Beta +! Version: 04January2023v1-Beta ! Expires: 18 hours ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -1743,6 +1743,7 @@ lav-det-selv.dk##.topic-aftercontent-desktop lav-det-selv.dk##.topwide lokalavisen.dk##div[class*=banner-container] samvirke.dk##.external-banner--continue +insidetelecom.no##.items-center:empty ! — — — — — ! 🇳🇴: Oppføringer med spesielle omstendigheter ! 🇬🇧: Entries with special circumstances diff --git a/NorwegianExperimentalList alternate versions/NordicFilters-uMatrixSupplement.txt b/NorwegianExperimentalList alternate versions/NordicFilters-uMatrixSupplement.txt index 501f0629c..08bbfab46 100644 --- a/NorwegianExperimentalList alternate versions/NordicFilters-uMatrixSupplement.txt +++ b/NorwegianExperimentalList alternate versions/NordicFilters-uMatrixSupplement.txt @@ -1,6 +1,6 @@ ! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (uMatrix-regler til å benytte sammen med domeneversjonen) ! Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites (uMatrix rules to use together with the raw domains version) -! Version: 03January2023v2-Alpha +! Version: 04January2023v1-Alpha ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md ! 🇳🇴: Denne listen dekker nettsteder for Norge, Danmark, Island, Færøyene, Grønland, Schleswig-Holsteins danske minoritet, og samebefolkningen. For mere informasjon, detaljer, hjelpemidler, og andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersABP-Inclusion.txt b/NorwegianExperimentalList alternate versions/NordicFiltersABP-Inclusion.txt index 5f2985ef7..eddf825b7 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersABP-Inclusion.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersABP-Inclusion.txt @@ -1,7 +1,7 @@ [Adblock Plus 3.13] ! Title: 🏔️ Dandelion Sprouts helnordiske filtre for ryddigere nettsider (for Adblock Plus - Møter ABP sine inkluderingsregler) ! Title 🇬🇧: Dandelion Sprout's All-Nordic filters for tidier websites (for Adblock Plus with ABP inclusion compliance) -! Version: 030120232 +! Version: 040120231 ! Expires: 18 hours ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -1680,6 +1680,7 @@ lav-det-selv.dk##.topic-aftercontent-desktop lav-det-selv.dk##.topwide lokalavisen.dk##div[class*=banner-container] samvirke.dk##.external-banner--continue +insidetelecom.no##.items-center:empty ! — — — — — ! 🇳🇴: Oppføringer med spesielle omstendigheter ! 🇬🇧: Entries with special circumstances diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersABP.txt b/NorwegianExperimentalList alternate versions/NordicFiltersABP.txt index 347a820e0..e6451738b 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersABP.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersABP.txt @@ -1,7 +1,7 @@ [Adblock Plus 3.13] ! Title: 🏔️ Dandelion Sprouts vestnordiske filtre for ryddigere nettsider (for AdBlock og Adblock Plus) ! Title 🇬🇧: Dandelion Sprout's West Nordic filters for tidier websites (for AdBlock and Adblock Plus) -! Version: 030120232 +! Version: 040120231 ! Expires: 18 hours ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -1688,6 +1688,7 @@ lav-det-selv.dk##.topic-aftercontent-desktop lav-det-selv.dk##.topwide lokalavisen.dk##div[class*=banner-container] samvirke.dk##.external-banner--continue +insidetelecom.no##.items-center:empty ! — — — — — ! 🇳🇴: Oppføringer med spesielle omstendigheter ! 🇬🇧: Entries with special circumstances diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersAdGuard.txt b/NorwegianExperimentalList alternate versions/NordicFiltersAdGuard.txt index 52fe5ce9c..1d8b2705a 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersAdGuard.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersAdGuard.txt @@ -1,6 +1,6 @@ ! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for AdGuard) ! Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites -! Version: 03January2023v2 +! Version: 04January2023v1 ! Expires: 18 hours ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -1742,6 +1742,7 @@ lav-det-selv.dk##.topic-aftercontent-desktop lav-det-selv.dk##.topwide lokalavisen.dk##div[class*=banner-container] samvirke.dk##.external-banner--continue +insidetelecom.no##.items-center:empty ! — — — — — ! 🇳🇴: Oppføringer med spesielle omstendigheter ! 🇬🇧: Entries with special circumstances diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersForMinerBlock.txt b/NorwegianExperimentalList alternate versions/NordicFiltersForMinerBlock.txt index 024e976ae..926c38dbf 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersForMinerBlock.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersForMinerBlock.txt @@ -2,6 +2,7 @@ # Translated title: Dandelion Sprout's Nordic Filters (for MinerBlock) # Version: 07December2023v1-Alpha # Description: This is a slimmer version of "Dandelion Sprout's Nordic Filters", intended for users of software tools that doesn't support adblocker syntaxes. It chiefly targets scams, malware and adverts, on Norwegian, Danish, Icelandic and Faroese websites. +!#if !env_mv3 # Platform notes: So, let's say your company boss is not letting you install any adblocker on your awful work laptop, but (s)he lets you install MinerBlock for some indeterminable reason? In this very unlikely case, I've saved your day. # Note: This list does not actually block any mining-related stuff. # For mere informasjon og detaljer om denne listen og om andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk @@ -630,3 +631,4 @@ # ——— Dummy entry used to give myself credit, for when this list is used in large compilation hosts-type files (Although they are fully allowed by my licence to use this list, it'd be nice for me and end-users to see where it's being used, as a few of them do not credit their sources) ——— *://*.if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data/* +!#endif diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersHostsIPv6.txt b/NorwegianExperimentalList alternate versions/NordicFiltersHostsIPv6.txt index 9b9149892..59a34110e 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersHostsIPv6.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersHostsIPv6.txt @@ -2,6 +2,7 @@ # Translated title: Dandelion Sprout's Nordic Filters (The IPv6 «hosts» file version) # Version: 07December2023v1 # Description: This is a slimmer version of "Dandelion Sprout's Nordic Filters", intended for users of software tools that doesn't support adblocker syntaxes. It chiefly targets scams, malware and adverts, on Norwegian, Danish, Icelandic and Faroese websites. +!#if !env_mv3 # Platform notes: This list version is meant to be used simultaneously of the regular «Hosts» version when using computer/Android system hosts file editors like Hosts File Editor, Gas Mask, Magisk Manager, etc. It is not needed for tools that strip away the entries' IP address, such as Blokada and pfBlockerNG. # For mere informasjon og detaljer om denne listen og om andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk # For more information and details about this list and other lists of mine, go to https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#english @@ -538,3 +539,4 @@ :: if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data www.if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data +!#endif diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersPiHole.txt b/NorwegianExperimentalList alternate versions/NordicFiltersPiHole.txt index 3a7c708fd..07fdd8df2 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersPiHole.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersPiHole.txt @@ -3,6 +3,7 @@ # Version: 07December2023v1-Deprecated # Users of Pi-Hole FTL 5.22 and later are STRONGLY RECOMMENDED to switch to the || version at https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersAdGuardHome.txt, unless otherwise proven. # Description: This is a slimmer version of "Dandelion Sprout's Nordic Filters", intended for users of software tools that doesn't support adblocker syntaxes. It chiefly targets scams, malware and adverts, on Norwegian, Danish, Icelandic and Faroese websites. +!#if !env_mv3 # Platform notes: This list version is intended for those who make use of the Regex functionality in Pi-Hole. Users of the list should also add the whitelist at https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersDomainsAllowlist.txt as a whitelist. # For mere informasjon og detaljer om denne listen og om andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk # For more information and details about this list and other lists of mine, go to https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#english @@ -629,3 +630,4 @@ hokaoneone.* # ——— Dummy entry used to give myself credit, for when this list is used in large compilation hosts-type files (Although they are fully allowed by my licence to use this list, it'd be nice for me and end-users to see where it's being used, as a few of them do not credit their sources) ——— if-a-large-hosts-file-contains-this-entry-then-it.uses-dandelion-sprouts-nordic-domains-as-a-source-list.data +!#endif diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersPrivacy.txt b/NorwegianExperimentalList alternate versions/NordicFiltersPrivacy.txt index b30e48f1a..e12d830d2 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersPrivacy.txt +++ b/NorwegianExperimentalList alternate versions/NordicFiltersPrivacy.txt @@ -1,6 +1,6 @@ ! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (uten sporerhvitelisting) ! Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites (without tracker whitelistings) -! Version: 03January2023v2 +! Version: 04January2023v1 ! Expires: 18 hours ! Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md ! Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -1742,6 +1742,7 @@ lav-det-selv.dk##.topic-aftercontent-desktop lav-det-selv.dk##.topwide lokalavisen.dk##div[class*=banner-container] samvirke.dk##.external-banner--continue +insidetelecom.no##.items-center:empty ! — — — — — ! 🇳🇴: Oppføringer med spesielle omstendigheter ! 🇬🇧: Entries with special circumstances diff --git a/NorwegianExperimentalList alternate versions/NordicFiltersPrivoxy.action b/NorwegianExperimentalList alternate versions/NordicFiltersPrivoxy.action index a42256ebb..928e03af0 100644 --- a/NorwegianExperimentalList alternate versions/NordicFiltersPrivoxy.action +++ b/NorwegianExperimentalList alternate versions/NordicFiltersPrivoxy.action @@ -1,6 +1,6 @@ # Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for Privoxy) # Title 🇬🇧: Dandelion Sprout's Nordic filters for tidier websites (for Privoxy) -# Version: 03January2023v2-Deprecated +# Version: 04January2023v1-Deprecated # Lisens / Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md # Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md # 🇳🇴: Denne listen dekker nettsteder for Norge, Danmark, Island, Færøyene, Grønland, Schleswig-Holsteins danske minoritet, og samebefolkningen. For mere informasjon, detaljer, hjelpemidler, og andre lister jeg har laget, gå til https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md#norsk diff --git a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py index b27c28ae9..f32c47209 100644 --- a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py +++ b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py @@ -3371,6 +3371,18 @@ def prepare_hosts(lines) -> str: line ) + line = re.sub( + r"(Description: .*)$", + r"\1\n!#if !env_mv3", + line + ) + + line = re.sub( + r"(if-a-large-hosts-file.*)", + r"\1\n!#endif", + line + ) + if is_supported_hosts(line): text += line + '\n' @@ -3760,6 +3772,18 @@ def prepare_pihole(lines) -> str: line ) + line = re.sub( + r"(Description: .*)$", + r"\1\n!#if !env_mv3", + line + ) + + line = re.sub( + r"(if-a-large-hosts-file.*)", + r"\1\n!#endif", + line + ) + text += line + '\n' return text @@ -4295,6 +4319,18 @@ def prepare_minerblock(lines) -> str: line ) + line = re.sub( + r"(Description: .*)$", + r"\1\n!#if !env_mv3", + line + ) + + line = re.sub( + r"(if-a-large-hosts-file.*)", + r"\1\n!#endif", + line + ) + text += line + '\n' return text @@ -4373,6 +4409,18 @@ def prepare_hostsipv6(lines) -> str: line ) + line = re.sub( + r"(Description: .*)$", + r"\1\n!#if !env_mv3", + line + ) + + line = re.sub( + r"(if-a-large-hosts-file.*)", + r"\1\n!#endif", + line + ) + if is_supported_hosts(line): text += line + '\n'