Description | Adds highlighting and tooltips to links to edit filters |
---|---|
Author(s) | Suffusion of Yellow |
First released | February 10, 2019 |
Updated | December 14, 2019 |
Browsers | Tested with Firefox and Chromium |
Skins | All |
Source | User:Suffusion of Yellow/filter-highlighter.js |
Filter Highlighter saves you the bother of clicking on links to edit filters, by adding styling to the filter link based on some of the filter parameters. Hovering over the link will reveal additional information about the filter in a tooltip.
For example, a link to Filter 384 will be shown as: Filter 384.[1]
Installation
editAdd the line {{subst:iusc|User:Suffusion of Yellow/filter-highlighter.js}}
to your common.js page.
Default highlighting
editEnabled | Disabled | Deleted | ||||
---|---|---|---|---|---|---|
Public | Private | Public | Private | Public | Private | |
Log-only | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Throttle, log-only | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Tag | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Throttle, tag | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Warn | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Throttle, warn | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Disallow | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Throttle, disallow | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
De-autoconfirm[2] | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Throttle, de-autoconfirm | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 | Filter 123 |
Customization
editThe default configuration is shown below. Copy this text to your common.js page, and modify as needed:
window.filterHighlighterConfig = {
// If you find the default highlighting ugly, you can substitute your own stylesheet here
// If you prefer no highlighting at all, use the empty string ("")
style : "User:Suffusion of Yellow/filter-highlighter.css",
// Change this to true to highlight the entire [[Special:AbuseFilter/nnn]] page.
// Mostly intended for EFMs, as this will make it impossible to forget that
// you're editing a filter that's set to disallow.
style_editor : false,
// Show title text (tooltip). Set to false for the default "Special:AbuseFilter/123"
show_title: true,
// Allow filter information to be up to this many seconds old.
// Set to a much larger value for slow connections. Set to 0 if you don't mind
// downloading an extra 140K every time you visit a page that mentions filters
cache_seconds : 30 * 60
};
Other options may be found in the source, but are unlikely to need changing.