svick's answer is outdated: User:Lampak/MyLanguages.js
is not maintained. So I went ahead and created a facelifted version: not using deprecated functions any more and much simpler.
Note: contrary to the question this solution works in any browser (IE, Chrome, Safari, ...), even on mobile if you're not viewing m.wikipedia.*
.
Usage
- Go to your Appearance settings
- Click the Custom JavaScript link
- Create or edit the page
Copy-paste the code:
var prefLangs = ["en", "simple", "hu", "de", "it", "es", "pt", "pl", "sv"];
var prefClasses = $.map(prefLangs, function(lang) { return '.interwiki-' + lang; });
var prefElems = $(prefClasses.join(', '));
prefElems.parent().prepend("<hr>").prepend(prefElems);
var highlitLangs = ["en", "simple", "hu"];
var highlitClasses = $.map(highlitLangs, function(lang) { return '.interwiki-' + lang; });
var highlitElems = $(highlitClasses.join(', '));
highlitElems.css('font-weight', 'bold');
Change prefLangs
and highlitLangs
array to suit your needs
(they don't need to be related, you can highlight non-moved languages as well)
- Save and read the Note: on the page
You can alternatively use it with your favorite web-site manipulation tool (Greasemonkey, Tampermonkey), but then it's tied to your current browser. Using the above method installs the script everywhere you're logged in.