Source Filters

Source Filters let you make more precise and accurate rules.

To apply a Source Filter there are different options available. You can make a source filter through the funnel icon you see on the rules editor page

By clicking on it a box will appear to make source filter.
Here you can make and edit your source filter.

First you can select page URL on which you want to add source filter. There are 4 ways to add your page URL of the site on which you want to apply this filter. It let's you apply your rule to a particular website instead of all the websites you open in your browser. In the select drop-down you will see 4 options. below is described how you can use them.

1. Equals

Equals operator does strict matching of URL intercepted by the browser with the URL given in rule.

Note that when you open www.example.com in browser, URL intercepted is www.example.com/. Note a trailing ‘/’ slash at the end of the URL. A rule with Equals operator and URL as www.example.com does not match www.example.com/. You may consider adding Slash (‘/’) at the end of the URL in your rule. You can alternatively create two pairs in the same rule as well.

Example:

URL given in Rule: http://www.google.com

Intercepted URL: http://www.google.com/

Result: Does not match (Observe trailing slash)

2. Contains

Contains operator does a sub-string search of string provided in rule inside the URL intercepted by Chrome. Example 1:

String in Rule: yahoo

Intercepted URL: https://www.yahoo.com/

Result: Match

Example 2:

String in Rule: com?a=1

Intercepted URL: https://www.got.com?a=2 Result: Does Not Match

3. RegEx

Regex Match Operator matches a given Regex with the URL intercepted by chrome. You can also use the values of group expressions in your destination URLs. It will be useful when on a particular site you want to target resources which the site is getting from another external site. So, here you can add that site and the rule will be applied on that site's requests.

Example 1: Suppose I want to block gstatic font on an example website, let's say photonkit.com here. Now what I will do I will make cancel request rule for photonkit.com but making rule without any filter will cancel the entire website from loading on our browser and I just want to cancel the gstatic font request when the site loads. So what I'll do is use RegEx in filter and add below expression in it. It'll cancel the gstatic font request.

Expression: /fonts.gstatic.com/

4. Wildcard

Wildcard match operator matches expression with the URL intercepted by chrome. We only support asterisk (*) as a wildcard operator. *can match 0 or more characters in intercepted URL. Please note that in wildcard match, complete URL is matched with given expression and *’s can be replaced with respective values in destination URL.

Example 1:

Expression: *://*.yahoo.com

URL: http://cricket.yahoo.com

Result: $1 = http, $2 = cricket

Example 2:

Expression: *yahoo

URL: http://www.yahoo.com

Result: Does not match. Note the trails does not match

Example 3:

Expression: *yahoo*

URL: http://www.yahoo.com

Result: $1 = http://www. $2=.com

Example 4:

Expression: http://*.yahoo.com

URL: http://cricket.yahoo.com/

Result: Does not match (Observe the trailing slash in URL)

Resource Type

From it you can select the exact type of file on which you want to apply your rule. By default it is selected to all types but you can specify the type of file on which you want to apply this rule from the drop-down.

Example 1: If you want to block all the images which appear on a particular website, than you can do so by selecting Resource type as image.

Example 2: You want to block all the CSS file which load on a particular website than you can select CSS in Resource Type to do so. It will block all CSS file on that website.

Request Method

From it you can modify a particular type on network request going from your desired website. By default it will apply on all type of network request but you can target a particular one from the drop-down.

Example 1: If you want to block a particular GET Request going from the entered site you can target it from here.