OLD | NEW |
1 title=Writing Adblock Plus filters | 1 title=Writing Adblock Plus filters |
2 | 2 |
3 | 3 |
4 <p>{{s1 Current Adblock Plus versions allow you to "tweak" your filters in many
different ways. This document explains the choices that you have and how they ca
n be used.}}</p> | 4 <p>{{s1 Current Adblock Plus versions allow you to "tweak" your filters in many
different ways. This document explains the choices that you have and how they ca
n be used.}}</p> |
5 | 5 |
6 <p>{{s2 <em>Disclaimer</em>: All filter examples given here are really only ex
amples and are not meant to be used.}}</p> | 6 <p>{{s2 <em>Disclaimer</em>: All filter examples given here are really only ex
amples and are not meant to be used.}}</p> |
7 | 7 |
8 <h2 id="introduction">{{s3 Introduction to Adblock Plus filters}}</h2> | 8 <h2 id="introduction">{{s3 Introduction to Adblock Plus filters}}</h2> |
9 | 9 |
10 <p>{{s4 The options described in this section should be enough for users who h
ave to create a filter occasionally.}}</p> | 10 <p>{{s4 The options described in this section should be enough for users who h
ave to create a filter occasionally.}}</p> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 <li>{{s56 Type options: determine which types of elements a filter can block
(or whitelist in case of an exception rule). Multiple type options can be speci
fied to indicate that the filter should be applied to several types of elements.
Possible types are:}} | 144 <li>{{s56 Type options: determine which types of elements a filter can block
(or whitelist in case of an exception rule). Multiple type options can be speci
fied to indicate that the filter should be applied to several types of elements.
Possible types are:}} |
145 <ul> | 145 <ul> |
146 <li>{{s57 <code><fix>script</fix></code> — external scripts loaded via H
TML script tag}}</li> | 146 <li>{{s57 <code><fix>script</fix></code> — external scripts loaded via H
TML script tag}}</li> |
147 <li>{{s58 <code><fix>image</fix></code> — regular images, typically load
ed via HTML img tag}}</li> | 147 <li>{{s58 <code><fix>image</fix></code> — regular images, typically load
ed via HTML img tag}}</li> |
148 <li>{{s59 <code><fix>stylesheet</fix></code> — external CSS stylesheet f
iles}}</li> | 148 <li>{{s59 <code><fix>stylesheet</fix></code> — external CSS stylesheet f
iles}}</li> |
149 <li>{{s60 <code><fix>object</fix></code> — content handled by browser pl
ugins, e.g. Flash or Java}}</li> | 149 <li>{{s60 <code><fix>object</fix></code> — content handled by browser pl
ugins, e.g. Flash or Java}}</li> |
150 <li>{{xmlhttprequest <code><fix>xmlhttprequest</fix></code> — requests s
tarted using the <a href="https://xhr.spec.whatwg.org/"><code><fix>XMLHttpReques
t</fix></code> object</a> or <a href="https://fetch.spec.whatwg.org/"><code><fix
>fetch()</fix></code> API</a>}}</li> | 150 <li>{{xmlhttprequest <code><fix>xmlhttprequest</fix></code> — requests s
tarted using the <a href="https://xhr.spec.whatwg.org/"><code><fix>XMLHttpReques
t</fix></code> object</a> or <a href="https://fetch.spec.whatwg.org/"><code><fix
>fetch()</fix></code> API</a>}}</li> |
151 <li>{{s63 <code><fix>object-subrequest</fix></code> — requests started b
y plugins like Flash}}</li> | 151 <li>{{s63 <code><fix>object-subrequest</fix></code> — requests started b
y plugins like Flash}}</li> |
152 <li>{{s64 <code><fix>subdocument</fix></code> — embedded pages, usually
included via HTML frames}}</li> | 152 <li>{{s64 <code><fix>subdocument</fix></code> — embedded pages, usually
included via HTML frames}}</li> |
153 <li>{{ping <code><fix>ping</fix></code> — requests started by <a href="h
ttps://developer.mozilla.org/docs/Web/HTML/Element/a#attr-ping"><code><fix><a
ping></fix></code></a> or <a href="https://developer.mozilla.org/docs/Web/AP
I/Navigator/sendBeacon"><code><fix>navigator.sendBeacon()</fix></code></a> (Adbl
ock Plus 2.7.1 or higher required)}}</li> | 153 <li>{{ping <code><fix>ping</fix></code> — requests started by <a href="h
ttps://developer.mozilla.org/docs/Web/HTML/Element/a#attr-ping"><code><fix><a
ping></fix></code></a> or <a href="https://developer.mozilla.org/docs/Web/AP
I/Navigator/sendBeacon"><code><fix>navigator.sendBeacon()</fix></code></a> (Adbl
ock Plus 2.7.1 or higher required)}}</li> |
| 154 <li>{{websocket <code><fix>websocket</fix></code> — requests initiated v
ia <a href="https://developer.mozilla.org/docs/Web/API/WebSocket"><code><fix>Web
Socket</fix></code> object</a> (Adblock Plus 2.8 or higher required)}}</li> |
154 <li>{{s65 <code><fix>document</fix></code> — the page itself (only <a hr
ef="#whitelist">exception rules</a> can be applied to the page)}}</li> | 155 <li>{{s65 <code><fix>document</fix></code> — the page itself (only <a hr
ef="#whitelist">exception rules</a> can be applied to the page)}}</li> |
155 <li>{{s66 <code><fix>elemhide</fix></code> — for exception rules only, s
imilar to <code><fix>document</fix></code> but only disables <a href="#elemhide"
>element hiding rules</a> on the page rather than all filter rules (Adblock Plus
1.2 or higher required)}}</li> | 156 <li>{{s66 <code><fix>elemhide</fix></code> — for exception rules only, s
imilar to <code><fix>document</fix></code> but only disables <a href="#elemhide"
>element hiding rules</a> on the page rather than all filter rules (Adblock Plus
1.2 or higher required)}}</li> |
156 <li>{{generichide <code><fix>generichide</fix></code> — for exception ru
les only, similar to <code><fix>elemhide</fix></code> but only disables <a href=
"#generic-specific">generic</a> element hiding rules on the page (Adblock Plus 2
.6.12 or higher required)}}</li> | 157 <li>{{generichide <code><fix>generichide</fix></code> — for exception ru
les only, similar to <code><fix>elemhide</fix></code> but only disables <a href=
"#generic-specific">generic</a> element hiding rules on the page (Adblock Plus 2
.6.12 or higher required)}}</li> |
157 <li>{{genericblock <code><fix>genericblock</fix></code> — for exception
rules only, just like <code><fix>generichide</fix></code> but disables <a href="
#generic-specific">generic</a> blocking rules (Adblock Plus 2.6.12 or higher req
uired)}}</li> | 158 <li>{{genericblock <code><fix>genericblock</fix></code> — for exception
rules only, just like <code><fix>generichide</fix></code> but disables <a href="
#generic-specific">generic</a> blocking rules (Adblock Plus 2.6.12 or higher req
uired)}}</li> |
158 <li>{{s67 <code><fix>other</fix></code> — types of requests not covered
in the list above}}</li> | 159 <li>{{s67 <code><fix>other</fix></code> — types of requests not covered
in the list above}}</li> |
159 </ul> | 160 </ul> |
160 {{deprecated-options The type options <code><fix>background</fix></code>, | 161 {{deprecated-options The type options <code><fix>background</fix></code>, |
161 <code><fix>xbl</fix></code> and <code><fix>dtd</fix></code> are outdated | 162 <code><fix>xbl</fix></code> and <code><fix>dtd</fix></code> are outdated |
162 and should no longer be used.}} | 163 and should no longer be used.}} |
163 </li> | 164 </li> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 {{s110 The data used for creating the signature is a concatenated list of requ
est variables (namely URI, host and user agent) separated by the <code><fix>NUL<
/fix></code> character "\0". For example:}} | 270 {{s110 The data used for creating the signature is a concatenated list of requ
est variables (namely URI, host and user agent) separated by the <code><fix>NUL<
/fix></code> character "\0". For example:}} |
270 </p> | 271 </p> |
271 | 272 |
272 <pre> | 273 <pre> |
273 /index.html?q=foo\0www.example.com\0Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv
:30.0) Gecko/20100101 Firefox/30.0 | 274 /index.html?q=foo\0www.example.com\0Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv
:30.0) Gecko/20100101 Firefox/30.0 |
274 </pre> | 275 </pre> |
275 | 276 |
276 <p> | 277 <p> |
277 {{s111 Finally, generate the signature for this string by using the signature
algorithm SEC_OID_ISO_SHA_WITH_RSA_SIGNATURE (default when using OpenSSL).}} | 278 {{s111 Finally, generate the signature for this string by using the signature
algorithm SEC_OID_ISO_SHA_WITH_RSA_SIGNATURE (default when using OpenSSL).}} |
278 </p> | 279 </p> |
OLD | NEW |