User:Daniel Quinlan/Scripts/AnyMessage
| Description | Adds string and regex search to Special:AllMessages in addition to the default prefix search. |
|---|---|
| Author | Daniel Quinlan |
| Status | Beta |
| Updated | 13 September 2026 |
| Browsers | Firefox, Safari, Chrome |
| Source | AnyMessage.js |
AnyMessage adds string and regex search to Special:AllMessages in addition to the default prefix search.
Features
[edit]- String search: Search for any substring in message names or text.
- Regex search: Search using regular expressions.
- Caching: Messages are cached in memory for up to one hour during a visit, with an option to always fetch fresh messages.
- Talk link resolution: Talk page links in results are resolved and linked when they exist.
- TranslateWiki links: Each result includes a direct link to the corresponding TranslateWiki translation page.
- Global support: Works globally across Wikimedia sites using the standard Special:AllMessages interface.
Usage
[edit]On Special:AllMessages, additional search options are displayed in a second column in the search form:
- Match type: Choose between String (substring search) and Regex (regular expression search). String is the default when AnyMessage is enabled.
- Case insensitive: When enabled, search is case insensitive.
- Search: Enable searching message Name, message Text, or both.
- Cache: By default, all messages are cached in memory for up to one hour. Enable Check for updated messages to always fetch fresh messages before each search.
- Mode: Use Disable AnyMessage to restore the original prefix search behavior. Your most recent choice is saved to your preferences.
Enter a search term in the search field and click the filter button to run the search. When AnyMessage is disabled, the original prefix search behavior is preserved. AnyMessage is also disabled initially when you follow a link that already includes a search query, such as a bookmarked search.
Regular expressions
[edit]A regular expression (regex) is a sequence of characters that define a pattern to search for in text. For an interactive introduction on how to write regular expressions, visit RegexOne.
Installation
[edit]To install the AnyMessage script, follow these steps:
- In your preferences, go to Preferences → Gadgets. At the bottom of the "Advanced" section, click the "Install scripts without having to manually edit JavaScript files (documentation)" checkbox, then click the "Save" button.
- Return to this page and click the blue "Install" button.
Alternatively, you can manually install it by adding the following code to your common.js file:
{{subst:iusc|User:Daniel Quinlan/Scripts/AnyMessage.js}}
Notes
[edit]- While AnyMessage works on most Wikipedia editions, its additional search controls are currently labeled in English only.
- When AnyMessage is enabled, searching fetches the full list of system messages at once and filters them locally, which may use significant bandwidth. The full list is cached in memory for up to one hour, and results are paginated using the limit setting.