Wikipedia Width Changer

Constrains Wikipedia articles to 40em in width for easier reading.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Wikipedia Width Changer
// @namespace    https://garner.io
// @version      1.2
// @description  Constrains Wikipedia articles to 40em in width for easier reading.
// @author       John Garner
// @icon         https://www.wikipedia.org/static/favicon/wikipedia.ico
// @grant        none
// @run-at       document-start
// @include      *://*.wikipedia.org/*
// @exclude      *://*.wikipedia.org/w/*
// @exclude      *://*.wikipedia.org/wiki/Main_Page*
// @exclude      *://*.wikipedia.org/wiki/Talk*
// @exclude      *://*.wikipedia.org/wiki/Special*
// @exclude      *://*.wikipedia.org/wiki/Wikipedia*
// @exclude      *://*.wikipedia.org/wiki/Help*
// @exclude      *://*.wikipedia.org/wiki/Portal*
// ==/UserScript==

document.getElementById("content").style.maxWidth = '40em';
document.getElementById("content").style.margin = 'auto';