This script/stylesheet is for PERSONAL use only!
You are free to install this script/stylesheet for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:ImportJS, MediaWiki:Common.js, MediaWiki:Common.css, MediaWiki:Fandomdesktop.js, MediaWiki:Fandomdesktop.css, or MediaWiki:FandomMobile.css), as it would violate Fandom's Terms of Use.
(See the customization policy)
AnnouncementsIgnore allows users to ignore announcement notifications from a number of Fandom communities. The script marks announcements as read from ignored wikis, and notices still appear in your notifications. It works with either an opt-in-all or an opt-out-all mode.
Installation
On your personal JS page, import the script using the importArticles
syntax at the bottom of the page and then specify any wikis you want to include/exclude using the syntax in the following code blocks. You must include exceptWikiIds
for the code to work as intended. If you want to opt in/out all wikis, use the line exceptWikiIds: []
.
The following example will opt in all Announcements except those from wikis with IDs 12345 and 23456.
// Show all announcements except those from 12345 and 23456
window.announcementsIgnore = {
option: 'opt-in-all',
exceptWikiIds: [
12345,
23456
]
};
The following example will opt out all Announcements except those from wikis with IDs 12345 and 23456.
// Ignore all announcements except those from 12345 and 23456
window.announcementsIgnore = {
option: 'opt-out-all',
exceptWikiIds: [
12345,
23456
]
};
- If
option: 'opt-out-all'
is set, it will opt out all announcements except those specified inexceptWikiIds
. - If
option: 'opt-in-all'
is set, it will opt in all announcements except those specified inexceptWikiIds
. - Wiki IDs can be obtained by either:
- Going to your wiki's Special:Version and looking for 'city_id'
- Running
alert(mw.config.get("wgCityId"))
in your browser's console
Using configuration options with Fandom Developers Wiki scripts
The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS
is used to load the scripts, it will be executed last.
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 2. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
Under the settings, install as follows: