A conservative customizer for the WikiMedia-based HotCat gadget which preserves the essential (+) "add" and (−) "remove" action buttons while providing the ability to suppress (↑) (↓) "arrows", (±) "change", and the remote category-existence status image.
- Keeps:
- (+) add
- (−) remove
- Can suppress (configurable):
- (±) change
- (↑) parent categories
- (↓) subcategories
- the yes/no category-existence status image
- Conservative DOM scope: only operates within the category links area.
- No API monkey‑patching, no constructor overrides, no global CSS hiding.
By default the customizer:
- Removes arrows (↑ ↓)
- Removes change (±)
- Removes the category-existence status image
- Keeps (+) and (−)
window.hotcat_customize = {
removeArrows: true, // remove ↑ ↓ (default: true)
removeChange: true, // remove ± (default: true)
removeExistsIcon: true // remove the yes/no image (default: true)
};-
Ensure the core HotCat gadget is enabled/loaded.
-
Copy
Gadgets/HotCatCustomizer.jsinto a wiki page named:
MediaWiki:Gadget-HotCatCustomizer.js
- Add or update your gadget definition in
MediaWiki:Gadgets-definition, for example:
* HotCatCustomizer[ResourceLoader|default]|HotCatCustomizer.js
- Pre‑configures HotCat to not render up/down controls when requested.
- Replaces HotCat's remote yes/no image URLs with an inline transparent pixel before an editor can use them, preventing external status-image requests.
- Removes the inert status-image element from HotCat's editor form.
- Prunes only the specific, localized labels (±, ↑, ↓) under the category links container.
- A small MutationObserver keeps pruning localized after HotCat re‑inits (e.g.,
postEdit).
- Designed against HotCat’s public UI markers and link labels (e.g.,
window.HotCat.links). - Does not rely on private internals.
- HotCat version: tested against
HotCat V2.44codebase structure.
- GPL-3.0
- Mark W. Datysgeld