Closed slavaleleka closed 8 months ago
e.g. template.txt:
template.txt
! @include "https://raw.githubusercontent.com/List-KR/List-KR/master/filter-AdGuard.txt" /exclude="../../exclusions.txt" ! Javascript rules [tv.nate.com#%#AG_onLoad(()](http://tv.nate.com/#%#AG_onLoad(()) => { var BuildObs, PlayerObs; let PlayerCall = (mutationList, observer) => { mutationList.forEach((e) => { if (Array.from(e.target.classList).some((e) => { return e === "ntv-ad-playing" })) { player.trigger("adended"); PlayerObs.disconnect() }})}; let BuildCall = (mutationList, observer) => { mutationList.forEach((e) => { Array.from(e.addedNodes).filter((o) => { return o.id === "natePlayer" }).forEach((k) => { PlayerObs = new MutationObserver(PlayerCall); PlayerObs.observe(k, { attributes: true }); BuildObs.disconnect() })})}; BuildObs = new MutationObserver(BuildCall); BuildObs.observe(document.querySelector(".player-wrapper"), { childList: true }) })
currently trust level limitations are applied to all rules retrieved from template.txt files which may contain:
@include
that’s why I assume it may be better to implement a new @inlude directive option which allow to ignore trust level limitations:
@inlude
@include "<file to include>" /ignoreTrustLevel
where <file to include> is same origin file only.
<file to include>
so eventually it will look like template.txt:
! @include "https://raw.githubusercontent.com/List-KR/List-KR/master/filter-AdGuard.txt" /exclude="../../exclusions.txt" ! @include "./additional-rules.txt" /ignoreTrustLevel
filter list directory structure:
filter_227_List-KR ├── additional-rules.txt <-- new file for js rules ├── diff.txt ├── filter.txt ├── metadata.json ├── revision.json └── template.txt
e.g.
template.txt
:currently trust level limitations are applied to all rules retrieved from template.txt files which may contain:
@include
directives (included rules)that’s why I assume it may be better to implement a new
@inlude
directive option which allow to ignore trust level limitations:where
<file to include>
is same origin file only.so eventually it will look like
template.txt
:filter list directory structure: