Fix for TPL and Privoxy

This commit is contained in:
Imre Kristoffer Eilertsen
2020-07-04 23:15:52 +02:00
committed by GitHub
parent 06b0105545
commit 7995c1a0df
5 changed files with 16 additions and 6 deletions
@@ -571,4 +571,4 @@ msFilterList
+d sixscissors.com
+d bildeler.name
+d reservedele.name
- gamereactor.*
-d
@@ -1365,4 +1365,3 @@ abcnyheter.no##div[style^="bottom: 0px;"]
@@||www.tv2.no/s/js/ads.js$script,~third-party
@@||bildeler.name$generichide
@@||reservedele.name$generichide
gamereactor.*$$script[onError="adblockEnabled()"]
@@ -661,5 +661,4 @@ gamereactor.*##+js(set, trackAdblock, noopFunc)
!#if env_firefox
!#endif
!#if !ext_ublock
gamereactor.*$$script[onError="adblockEnabled()"]
!#endif
@@ -668,5 +668,5 @@ contentMarketing
#
#
#
gamereactor.*
#
#
@@ -4,10 +4,10 @@ import re
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianList.txt', 'https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/AntiAdblockEntries.txt']
UNSUPPORTED_ABP = ['$important', ',important', '$redirect=', ',redirect=',
':style', '##+js', '.*#' , 'dk,no##', '!#if', '!#endif', '!+ ', '##^']
':style', '##+js', '.*#' , 'dk,no##', '!#if', '!#endif', '!+ ', '##^', '$$']
UNSUPPORTED_TPL = ['##', '#@#', '#?#', r'\.no\.$']
UNSUPPORTED_PRIVOXY = ['##', '#@#', '#?#', '@@', '!#']
UNSUPPORTED_BRAVE = ['#@#', '#?#', 'emty.gif', '1pix.gif', '730.no/banner/', 'gaysir.no/rek/', '85.17.76.181', 'youtube.jpg', 'instagram', 'cookieinformation', 'Social Blocking', '/admark_', 'PFBLOCKERNG', 'boks', 'rammar', ' spaces', 'services.api.no', 'Viatrumf', 'Internet Explorer', 'Elkjøp', ' elding.fo', ' background', 'baggrund', 'EasyList —', 'baksýn', '!+ NOT_OPTIMIZED']
UNSUPPORTED_BRAVE = ['#@#', '#?#', 'emty.gif', '1pix.gif', '730.no/banner/', 'gaysir.no/rek/', '85.17.76.181', 'youtube.jpg', 'instagram', 'cookieinformation', 'Social Blocking', '/admark_', 'PFBLOCKERNG', 'boks', 'rammar', ' spaces', 'services.api.no', 'Viatrumf', 'Internet Explorer', 'Elkjøp', ' elding.fo', ' background', 'baggrund', 'EasyList —', 'baksýn', '!+ NOT_OPTIMIZED', '$$']
OUTPUT = 'xyzzyx.txt'
OUTPUT_AG = 'NordicFiltersAdGuard.txt'
@@ -640,6 +640,12 @@ def prepare_tpl(lines) -> str:
line
)
line = re.sub(
r".*\$\$script.*",
"-d ",
line
)
line = re.sub(
r"^/",
"- ",
@@ -1045,6 +1051,12 @@ def prepare_privoxy(lines) -> str:
line
)
line = re.sub(
r".*\$\$script.*",
r"",
line
)
line = re.sub(
r"\$.*",
"",