User:Þjarkur/Nudge me to read in another language

From WikiProjectMed
Jump to navigation Jump to search
Nudge me to read in another language
StatusWorks
SourceUser:Þjarkur/Nudge me to read in another language.js

This script nudges you to read more in the language you're interested in by displaying the beginning of that language's Wikipedia article while you read articles here at the English language Wikipedia.

Example

With this script, the first paragraph of your desired language is shown below the introduction of the English language article like so. Citations are omitted.

Hadean

From Wikipedia, the free encyclopedia

The Hadean is a geologic eon of the Earth pre-dating the Archean. It began with the formation of the Earth about 4.6 billion years ago and ended, as defined by the International Commission on Stratigraphy (ICS), 4 billion years ago. As of 2016, the ICS describes its status as "informal". Geologist Preston Cloud coined the term in 1972, originally to label the period before the earliest-known rocks on Earth.

El eón Hádico es una división informal de la escala temporal geológica, es la primera división del Precámbrico. Comienza en el momento en que se formó la Tierra hace unos 4567 millones de años y termina hace 4000 millones de años, durando unos 567 millones de años, cuando comienza el eón Arcaico. [Continue reading...]

Installation and setup

Add this to your common.js file and replace 'ru' (language code for Russian) with your desired language. The language code is the subdomain found in "https://ru.wikipedia.org", the list of Wikipedia language codes is here.

window.nudge_me_to_read_in_this_language_code = 'ru'

After selecting your language code, add this to your common.js file: importScript('User:Þjarkur/Nudge me to read in another language.js');

This script has not been adapted to work on the mobile version yet.