2

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.

4 Answers 4

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}
2
  • Thanks for the tip. And thanks for indirectly reminding me of Greasemonkey. That's where i actually found the exact solution to the problem. This Greasemonkey script: Wikipedia rearrange other languages hides irrelevant languages in Firefox.
    – ruslaniv
    May 23, 2013 at 5:40
  • Userscripts.org is dead, if you want to rearrange instead of hiding irrelevant ones, check out my answer.
    – TWiStErRob
    May 12, 2015 at 13:03
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
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.

2
  • That's something in the right direction. Good thing this is a "server-side" tweak and can be used with any browser. Bad thing - it has to be setup on every regional wikipedia separately. That is where i stumbled. I managed to get it working on English language wiki, but i failed to set it up on Russian language wiki. Maybe it has to do with translations, for instance importScript('User:Somebody/script.js') requires translation of the word "User" into Russian language.
    – ruslaniv
    May 16, 2013 at 10:29
  • @RusI I believe it doesn't require translation, but it does require that the script exists on that wiki. So, if you want to use it on a wiki where it doesn't exist, you need to copy it there.
    – svick
    May 16, 2013 at 11:59
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .