Support/KarmaBlocker/Examples

Back: wiki:Extensions/KarmaBlocker


For all the examples below, assume a settings section like this:

[Settings]
threshold=10
cutoff=100

Any file containing a word that starts with "ad" or "banner", that is loading from a different site, will be blocked:

[Group]
score=5
rule=$thirdParty==true

[Group]
score=5
rule=$url=~'\b(ad|banner)'

Make sure that files on a particular site are never blocked:

[Group]
score=-100
rule=$url.host='www.example.com'

Plug a  potential security hole by blocking chrome from web pages:

[Group]
score=100
match=all
rule=$url.scheme=='chrome'
rule=$origin.scheme!='chrome'

Block any javascript loaded from a third party host (different domain).

[Group]
match=all
score=100
rule=$thirdParty==true
rule=$type==script