3

Is there any way i can hide irrelevant languages in Wikipedia in Forefox browser? I want to hide everything except English and Ukrainian for instance so i do not have to scroll on every page up and down every time i need to switch language of an article.

Edit: I know there is an extension for Chrome "Wikipedia Hide Languages" which does what i want, i want something similar for Firefox.

ruslaniv
  • 932

4 Answers4

1

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

  1. Go to your Appearance settings
  2. Click the Custom JavaScript link
  3. Create or edit the page
  4. 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');
    
  5. Change prefLangs and highlitLangs array to suit your needs
    (they don't need to be related, you can highlight non-moved languages as well)

  6. 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.

preview of the enhancement

0

I'm using a user script to move the languages that are important for me to the top. This will work for any browser, as long as you are logged in on Wikipedia. But it works only for a specific Wikipedia, if you wanted it to work on multiple Wikipedias, you would need to set it up on each of them.

svick
  • 927
0

It's very easy to do it with Stylish

Create a new style for the wikipedia.org domain with the following content

  #p-lang > div > ul > li {display:none !important}

  #p-lang > div > ul > li.interwiki-en,
  #p-lang > div > ul > li.interwiki-uk {display:block !important}
paa
  • 972
0

There's an Universal Language Selector lab that you can enable in the beta features preferences.

It says it's working based on your location (Geo-IP), so it may not be as good as other options.