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)
CustomHeaderDropdown proporciona la funcionalidad para personalizar el menú desplegable del encabezado de la comunidad a través de variables de configuración, y estas son necesarias para que el script funcione correctamente.
Installation[]
Configuration[]
Debe proporcionar una cierta cantidad de configuración antes de la llamada importArticles para que el script funcione. Puede hacer esto configurando el array global window.CustomHeaderLink que contiene los objetos de atributo jQuery. Puede configurar controladores de eventos o vincular destinos a través de estos.
Configuración de ejemplo:
window.CustomHeaderLinks = [
{
text: 'Best Wiki',
href: 'https://dev.fandom.com'
},
{
text: 'Discussions RC',
href: mw.util.getUrl('Special:DiscussionsRC')
},
{
text: 'Alert',
click: function() {
alert('Huzzah, this is useless!');
}
}
];
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'
]
});