FANDOM


This script is for PERSONAL use only!

You are free to install this script for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:Common.js or MediaWiki:Wikia.js), as it would violate Fandom's Terms of Use.
(See the customization policy)

OldFilePages reverts file pages to the old design—no tabs. It also makes some improvements, such as re-adding duplicate file listings and listing regular links to the file if there are no transclusions. The intention is to make it easier for people who are working on file maintenance and such tasks.

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:OldFilePages/code.js',
    ]
});

Configuration

Configuration of this script is done through the OFPoptions object. You should insert it into your global.js/common.js pages if you're importing it for personal use or into MediaWiki:Common.js page on your wiki if you're importing it for site-wide use. There are two configuration options you can use:

  • showlinks — Set to true if you want links to the file to show below transclusions regardless of whether it's used anywhere
  • limit — Set to a number to change the biggest amount of files that will be displayed in the transclusions section

Example configuration

This is only example configuration and isn't required for the script to work.

window.OFPoptions = {
    showlinks: false,
    limit: 200
};

This will make the list of pages that link to the file show up regardless of whether a page transcludes it and the maximum amount of transclusions shown will be set to 200.

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
importScriptPage('AjaxRC/code.js','dev');
 
// 2. AjaxRC configuration option
var ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
var ajaxRefresh = 30000;
 
// 2. AjaxRC import statement
importScriptPage('AjaxRC/code.js','dev');

Comments

Please leave a message on the script's talkpage with any bug reports, feature requests or anything else.

Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+