Fandom

Wikia Developers Wiki

AutoEditDropdown

861pages on
this wiki
Add New Page
Talk13 Share

AutoEditDropdown causes the drop down menus for edit buttons in Oasis to be automatically shown when you mouse over the adjacent arrow. Eliminating the need to click on the arrow can allow for a faster and more convenient editing experience. The drop down menu will automatically disappear when the cursor leaves the menu area.

Installation

See also: Help:JavaScript and CSS Cheatsheet, Help:Including additional JavaScript and CSS

To activate this script for all users on a single wiki, admins should add the following code to their MediaWiki:Wikia.js page. Users who want to install this script for themselves on all Wikia wikis should put it in their global.js on Community Central. See the help pages linked above for more information about installing JavaScript and CSS on Wikia.

importArticles({
    type: 'script',
    articles: [
        'u:dev:AutoEditDropdown/code.js'
    ]
});

Español

Ver también: Help:JavaScript and CSS Cheatsheet, Help:Including additional JavaScript and CSS

Para activar esta secuencia de comandos para todos los usuarios en un solo wiki, los administradores deben añadir el siguiente código a su página MediaWiki: Wikia.js. Los usuarios que deseen instalar este script por sí mismos en todos los wikis de Wikia deberían ponerlo en sus global.js sobre Central de la Comunidad. Ver las páginas de ayuda ligada arriba para obtener más información sobre la instalación de JavaScript y CSS en Wikia.
importArticles({
    type: 'script',
    articles: [
        'u:dev:AutoEditDropdown/code.js'
    ]
});

Options

Note: Config settings must be set before the script is imported, otherwise they'll be ignored.

This script can be customized to include additional functionality. To do this, an AutoEditDropdownConfig object must be defined and individual options must be set to true—otherwise, all options are set to false by default. The list of available options includes:

option name true false
expandedAreaContribute Hovering over any part of the 'contribute' button will cause the dropdown menu to appear. The dropdown menu appears when hovering over the arrow only.
expandedAreaEdit Hovering over any part of the 'edit' button will cause the dropdown menu to appear. The dropdown menu appears when hovering over the arrow only.

Sample Configuration

// AutoEditDropdown config - http://dev.wikia.com/wiki/AutoEditDropdown
window.AutoEditDropdownConfig = {
    expandedAreaContribute: true,
    expandedAreaEdit: false
};
 
importArticles({
    type: 'script',
    articles: [
        'u:dev:AutoEditDropdown/code.js'
    ]
});

Bad Configuration

This is an example of what not to do when setting up your configuration settings. These config settings will be ignored because they were not set up before the script was imported.

importArticles({
    type: 'script',
    articles: [
        'u:dev:AutoEditDropdown/code.js'
    ]
});
 
// NO - DON'T DO THIS - importArticles() MUST COME AFTER CONFIG SETTINGS!!
 
window.AutoEditDropdownConfig = {
    expandedAreaContribute: true,
    expandedAreaEdit: false
};

Updates

5 October 2012
Mathmagician: Converted JavaScript file to simply calling the CSS implementation.
10 May 2012
Mathmagician: Deprecating script in favor of a pure CSS implementation provided by Pecoes on Talk:AutoEditDropdown.
7 May 2012
Mathmagician: Fixed a bug that was causing the script to not load with the default settings when AutoEditDropdownConfig is not defined.
6 May 2012
Mathmagician: Added expandedAreaContribute and expandedAreaEdit options.
29 April 2012
Mathmagician: Created.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.