User:Suffusion of Yellow/filter-highlighter

Filter Highlighter
DescriptionAdds highlighting and tooltips to links to edit filters
Author(s)Suffusion of Yellow
First releasedFebruary 10, 2019; 5 years ago (2019-02-10)
UpdatedDecember 14, 2019; 4 years ago (2019-12-14)
Browser supportTested with Firefox and Chromium
Skin supportAll
SourceUser: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

Add the line {{subst:iusc|User:Suffusion of Yellow/filter-highlighter.js}} to your common.js page.

Default highlighting

EnabledDisabledDeleted
PublicPrivatePublicPrivatePublicPrivate
Log-onlyFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
Throttle, log-onlyFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
TagFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
Throttle, tagFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
WarnFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
Throttle, warnFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
DisallowFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
Throttle, disallowFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123
De-autoconfirm[2]Filter 123Filter 123Filter 123Filter 123Filter 123Filter 123
Throttle, de-autoconfirmFilter 123Filter 123Filter 123Filter 123Filter 123Filter 123

Customization

The 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.

Notes