Fandom

Wikia Developers Wiki

PersistentParameters

889pages on
this wiki
Add New Page
Talk3 Share
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)

PersistentParameters is a script that will append selected GET parameters specified in the URL to all internal links on the page.

This allows to for example: browse a wiki in a different skin or UI language without the need to change your preferences. Just add useskin=monobook to the URL and browse the wiki in Monobook.

Notes

  • Script affects only internal wiki links. Links to other wikis/sites won't be affected.
  • If one or more parameters are already specified in a link they won't be changed.
  • It won't affect forms.
  • Since the script modifies all internal links on the page – including ones in off limits zones – it's personal use only

Installation

importScriptPage('PersistentParameters/code.js', 'dev');

or

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

Configuration

Default parameters that will carry over are uselang and useskin, you can change them by specifying your own above the import:

var persistentParameterList = ['list', 'of', 'your', 'parameters']
importScriptPage('PersistentParameters/code.js', 'dev');

At the moment only one parameter is blacklisted:

  • action

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.