ChatAnnouncements allows you to make announcements in chat. By default only chat moderators and above can send announcements, though you can set a variable above the site-wide import to allow anyone to do it.
NOTE: It MUST be imported in the wiki's MediaWiki:Chat.js page or it will not work site-wide.
To send an announcement, you must start each one with "/announce " with the message going after the first space. If the message is not started this way, it will not work.
The announcement will be sent in the format of <username>: <message>
To install this script add the following to your wiki's MediaWiki:Chat.js:
If you'd like to make the script usable for everyone, add the following above the import statement:
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.