Fandom

Wikia Developers Wiki

Loadables

847pages on
this wiki
Add New Page
Talk9 Share

Loadables is a series of small scripts that load web resources, such as Jquery UI, that Mediawiki normally doesn't load; so they can be used by other scripts.

Developer Information

These scripts are an internal resource designed for use by other scripts. In order to use these scripts in code you are making, add an importArticles statement to load the resources you need, within the code you are working on.

End User Information

These scripts are an internal resource designed for use by other scripts. Ideally, they will be auto-installed by any scripts you want to install. However, if they are not, read the next section, installation instructions.

Installation Instructions

Due to the nature of these scripts, the installation process is more complex than usual. As a result, the instructions are conditional. Sorry in advance.

Are you the Developer Or The User
Developer
In the header of your script, perform a dependency installation. See below for details.
User
Does the Script automatically import the required features?
Yes
Congratulations. No effort is required on your part, aside from installing the feature that uses this.
No
Is the script that is being installed going to be installed locally or globally?
Local
Is the script being depended on already installed globally or locally?
Yes
Congratulations. No effort is required on your part, aside from installing the feature that uses this.
No
Perform a local installation. See below for details.
Global
Is the script being depended on already installed globally?
Yes
Congratulations. No effort is required on your part, aside from installing the feature that uses this.
No
Perform a global installation. See below for details.

How to perform a dependency installation

  1. Add the following to your the top of your script:
    importScriptPage('Loadables/whichOneIsRequired.js', 'dev');
  2. Wait up to half an hour for all the caching problems to be dealt with.

How to perform a global installation

  1. Add the following to your MediaWiki:Common.js:
    importScriptPage('Loadables/whichOneIsRequired.js', 'dev');
  2. Wait up to half an hour for all the caching problems to be dealt with.

How to perform a local installation

  1. Add the following to your global.js:
    importScriptPage('Loadables/whichOneIsRequired.js', 'dev');
  2. Wait up to half an hour for all the caching problems to be dealt with.

Provided Resources

Resource Description link
JQuery UI Provides interface features, such as tabs and specialized inputs. Note that this featureset is installable by more direct means. So this script is a proof of concept. MediaWiki:Loadables/JQueryUI.js
JQuery Mobile Provides additional features specifically made for Mobile browsers. MediaWiki:Loadables/JQueryMobile.js
Three.js Provides a radically simplified 3d rendering engine MediaWiki:Loadables/Three.js

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.