Skip to content

maxim-puchkov/AdFree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdFree

App description.

Contents

  1. Triggers
  2. Actions
  3. Examples
  4. Documentation

Triggers

  • url-filter-is-case-sensitive
  • if-domain
  • unless-domain
  • resource-type
    • document
    • image
    • style-sheet
    • script
    • font
    • raw
    • svg-document
    • media
    • popup
  • load-type
    • first-party
    • third-party
  • if-top-url
  • unless-top-url

Actions

  • Types
    • block
    • block-cookies
    • css-display-none
    • ignore-previous-rules
    • make-https
  • Selector

Regex

  • Original list
&ad_box_
&ad_channel=
&ad_classid=
  • Replace ^([^$\s]*) with
"trigger": {
	"url-filter": "$1",
	"load-type": ["third-party"]
}, "action": {
	"type": "block"
},
  • Resulting list
"trigger": {
    "url-filter": "&ad_box_",
    "load-type": ["third-party"]
}, "action": {
    "type": "block"
},
"trigger": {
    "url-filter": "&ad_channel=",
    "load-type": ["third-party"]
}, "action": {
    "type": "block"
},
"trigger": {
    "url-filter": "&ad_classid=",
    "load-type": ["third-party"]
}, "action": {
    "type": "block"
},

Examples

  • Rule syntax 1
[
    {
        "trigger": {
            "url-filter": ".*",
            "resource-type": ["document", "image", "style-sheet", "script"],
            "unless-domain": ["*apple.com", "trusted-content-server.com"]
        },
        "action": {
            "type": "block"
        }
    }
]
  • Rule syntax 2
[
    {
        "trigger": {
            "url-filter": ".*",
            "resource-type": ["document", "image", "style-sheet", "script", "font",
                "raw", "svg-document", "media", "popup"],
            "if-domain": ["*exoticads.com"]
        },

        "action": {
            "type": "block"
        }
    }
]

Documentation