Fandom Developers Wiki
Advertisement

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 or MediaWiki:Fandomdesktop.css), as it would violate Fandom's Terms of Use.
(See the customization policy)

AdvancedOasisUI adds various links and buttons to Fandom's UI. Primarily, it restores functionalities from previous skins which were removed from Oasis.

Features

Adds button to Special:Search for proceeding to page if it does not exist
Functioning as a replacement for the removed redlink to the search term on Special:Search, a button is added to the search tabs on the left which allows users to proceed to the search term-titled page.
(Optional) Adds "watchlist" link to account navigation
Optionally, a link to Special:Watchlist is added to the account navigation menu. Disabled by default but can be enabled via configuration option.
(Optional) Turns category links to non-created categories into proper redlinks
Optionally, category links pointing to non-created categories are turned into proper redlinks (in the site-specific color), i.e. the MediaWiki default is restored. Enabled by default but can be disabled via configuration option.
(Optional) Removes Image Lightboxes
Optionally, removes the image lightboxes which are shown when one clicks on an image. Enabled by default but can be disabled via configuration option.
(Optional) Limits "random page" button results to specific namespace
Optionally, the "random page" button is modified so only pages from a chosen namespace are returned. Empty by default but can be specified via configuration option.

Installation

Configuration

To configure the script, insert this above the script import:

window.AdvancedOasisUI = {
    accountNavWatchlist: false,
    categoryRedlink: true,
    lightbox: true,
    randomPageLimitedTo: '',
    userLang: true,
};

For an explanation of the available options, see "Options" below.

Options

accountNavWatchlist
If set to true, a link to "watchlist" (Special:Watchlist) is added to the account navigation menu. Default: false.
categoryRedlink
If set to true, category links pointing to non-created categories are turned into proper redlinks (in the site-specific color), i.e. the MediaWiki default is restored. Default: true.
lightbox
See NoImageLightbox for available options. Default: true.
randomPageLimitedTo
If set to a non-empty value, the "random page" link in the wiki header is modified to yield only results from the chosen namespace. For example, setting it to "Category" will make the button lead only to pages in the "category" namespace. See w:Help:Random page for valid options. Default: empty.
userLang
By default, the script tries to display messages in your Fandom configured language (specified in your preferences).
You can configure this by setting userLang to a language code to force that language always. The script will fallback onto English if it lacks translations for the chosen language.
Example:
// Force the script to always display in German
window.AdvancedOasisUI = {
    userLang: 'de'
};

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.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;

// 2. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});
Text above can be found here (edit)
Advertisement