Here it is. I don't yet have the right to edit wiki nor it has a 'view source' function. So I can't know the local markup and am using an ad-hoc one (using HTML or MediaWiki's would require too much rewriting if local one differs greatly).
Lists are intended to be tables, each item being a row. "--" is the column separator. A sublist is a subtable. Everything that's supposed be the part of a filter code and references to such parts are intended to be monospace. Bold subheaders inside lists are intended to be colspan unless there's an embedded column separator, in that case they are column headers.
The grammar used is a standard command-line syntax format grammar.Important:
"??" designate the details that aren't described in "Writing... filters" and need further clarification.General format
Element hiding rulesWarning:
- Format -- Comments
- string -- Match anywhere (there is an implied * at start and at end). The match is case-insensitive. Metacharacters are:
(?? metacharacter escaping?)
- * -- matches anything
- ^ -- matches an URL separator - anything except letters, digits, underscore(_), minus(-), dot(.), percent sign(%). Matches at the end of the line, too.
- |string -- Match at the start of URL
- string| -- Match at the end of URL
- ||example.com/banner.gif -- Match at the start of URL, both http and https and subdomains
- @@rule -- an exception rule
- @@|http://example.org -- Disable ABP for all pages in a domain (?? subdomains?). Address must start with http:// or https://, pipe is optional
- ! This is a comment -- a comment (-C.O.)
- rule$option[,...] -- filter options (see below)
These rules' syntax is unrelated to the general syntax! Specifically, wildcards and regexps cannot be used unless stated otherwise.Element Hiding Helper extension
is a great help in writing these filters.
- ##[tag][attr-spec[...]][,...] -- hide the contents of elements matching the given CSS3 selector (note that not all CSS3 selectors are supported by FF yet).
Hide tag(s) with attributes matching the given specification(s).
Either tag or specifications can be omitted. To omit both, use * as tag.
An attribute specification can be one of the following:
- #id -- id attribute equals id
- .class or [class~=class] -- class attribute includes class
- [attr[*|^|$]="str"] -- attr attribute matches str (?? how to specify embedded quotes?)
The comparison methods are:
- = -- equals
- *= -- contains
- ^= -- starts with
- $= -- ends with
- ##tag-spec1 > tag-spec2[:firstchild][:lastchild] [+ ...] -- hide contents of a tag matching tag-spec1 that has child(ren) matching tag-spec2, etc (?? in that/any order?) optionally requiring a child to be the first and/or the last child. (?? must the number of children be equal to the number of child tags specified here if there's more than one specified? - element hide helper suggests it must) (?? can a child specification match multiple child tags?)
This construction can be recursed. (?? how are subexpressions delimited?)
If there are multiple children specified, "tag-spec1 >" can be omitted to block any tag with matching children.
- [~]domain[,...]##rule -- only apply an element-blocking rule to domain(s), including subdomains. A leading tilde excludes a domain and its subdomains.
- browser##rule -- (side-effect) apply an element-blocking rule to FF UI (?? link to info on its object tree)
- #tag[(attr=value) -- deprecated simplified element hiding syntax. (?? details?)
Make the filter only apply to specific objects or otherwise modify its behavior
(?? how various options are connected together, precedence)
- Type options -- apply to objects of a specific type
- script -- external scripts loaded via HTML script tag
- image -- regular images, typically loaded via HTML img tag
- background -- background images, often specified via CSS
- stylesheet -- external CSS stylesheet files
- object -- content handled by browser plugins, e.g. Flash or Java
- xbl -- XBL bindings (typically loaded by -moz-binding CSS property)
- ping -- link pings
- xmlhttprequest -- requests started by the XMLHttpRequest object
- object-subrequest -- requests started by plugins like Flash
- dtd -- DTD files loaded by XML documents
- subdocument -- embedded pages, usually included via HTML frames
- document -- the page itself (exception rules only, disables ABP for the page)
- elemhide -- similar to document but only disables element hiding rules rather than all filter rules (exception rules only) (ABP 1.2+)
- other -- everything else
- Other options
- ~option -- negate option (applicable to all options except domain)
- third-party -- apply to requests with the different origin that the currently viewed page (?? explain how it can be, e.g. example)
- domain=[~]domain1[|[~]domain2[,...]] -- apply to domain and subdomains. A leading tilde excludes a domain with subdomains
- match-case -- match case-sensitively
- collapse -- override the "Collapse blocked elements" setting
- donottrack -- send a Do-Not-Track header unless the URL also matches an exception rule with such option (ABP 1.3.5+)