An script to set global preferences when the user visits a wiki.
How it works
The script reads the preferences "userjs-global-preferences" and "userjs-global-preferences-exceptions" from a central wiki (Meta-wiki). The first of them contains the preferences the user wants to set on each wiki. The second one is for the user to set exceptions, to allow some wikis to have values different from the global ones.
For now, in order to save JSON objects like these in the Meta-wiki preference, the script provides two links in the actions menu (the one which contains the "Move" link), which shows a simple prompt when activated. The user needs to copy/write a JSON string to the prompt, and press OK. In the future (issue #1), a better interface should be provided to help the users (and to avoid syntax errors).
If everything goes well, the choosen preferences should be copied to other wikis when you visit them (it will show a notification in the top right corner of the page).
- Go to one of the js subpages of your user page. You can choose a page such as these:
<Name>/global.js, which will be loaded in all wikis, in all skins
<Name>/common.js, which will be loaded only on Meta-wiki, in all skins
<Name>/vector.js, which will be loaded only on Meta-wiki, in the vector skin
- Copy the following to the page you have chosen:
- Clear the cache of your browser.
This will import the minified copy of the script I maintain on Meta-wiki.