Extension Blocklisting:Code Design: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→Update model) |
||
Line 4: | Line 4: | ||
* Download a blacklist file on a timer (86400 default) | * Download a blacklist file on a timer (86400 default) | ||
* If items are newly blacklisted or unblacklisted, adjust the datasource appropriately and prompt to restart. | * If items are newly blacklisted or unblacklisted, adjust the datasource appropriately and prompt to restart. | ||
* | * The blacklist file will be placed in the profile-dir. | ||
* Blacklist is _replaced_ on each update, not merged or otherwise combined. | * Blacklist is _replaced_ on each update, not merged or otherwise combined. | ||
Revision as of 22:24, 14 February 2006
Simple blacklisting for Firefox 1.5
Update model
- Download a blacklist file on a timer (86400 default)
- If items are newly blacklisted or unblacklisted, adjust the datasource appropriately and prompt to restart.
- The blacklist file will be placed in the profile-dir.
- Blacklist is _replaced_ on each update, not merged or otherwise combined.
Blacklist syntax
- Blacklist file has simple text syntax:
<entryType> <extension ID> [<minVersion> <maxVersion>]
entryType can be "forbid" to force an extension (with optional version range) to be disabled, or "permit" to exempt a given extension (usually with version) from blacklisting. If minVersion is specified, maxVersion must also be specified (though they can be equal). Versions are compared inclusively.
The blacklist file is processed in order, and the first rule found that matches a given extension determines if the extension is disabled (forbid rule found) or not (permit rule found). If no matching rule is found, the extension is permitted (not disabled by the blacklist).
Blank lines are skipped, and # introduces a comment running until the end of the line.
Examples:
forbid inspector@mozilla.org # disable all versions of inspector@mozilla.org permit random@extension.com 0.5 # permit version 0.5 of random@extension.com forbid random@extension.com 0.1 0.9 # but blacklist everything else between 0.1 and 0.9 forbid {220f8b46-15a9-4dde-93f1-c487491343f6} # GUID form