Automatically loads Mobile Wikipedia if you visit the desktop version of Wikipedia from a different site; provides a shortcut to switch between the two and stays on the version you switched to.
This script will automatically switch to the mobile version of Wikipedia or Wiktionary if you visit the site from somewhere else.
I find the mobile version much more readable with its narrower column, while the desktop version has smaller fonts and lines that span the whole wide screen of my desktop computer.
The script also provides a shortcut to switch between mobile and non-mobile Wikipedia (see below). Note: Once you have switched, the script will keep the current mode as you click through articles, so that you don't load the desktop version, click on a link, and get switched back to mobile. This would be jarring. So the script keeps you in the last mode you switched to, and you can re-use the same shortcut at any time to switch back and again stay in the mode you last selected.
You can configure this script by editing a few lines at the top:
AUTOLOAD_MOBILE = true;
to AUTOLOAD_MOBILE = false;
ENABLE_MOBILE_DESKTOP_SHORTCUT = true;
to ENABLE_MOBILE_DESKTOP_SHORTCUT = false;
ENABLE_EDIT_SHORTCUT = true;
to ENABLE_EDIT_SHORTCUT = false;
E
and M
shortcuts to trigger without a modifier like Ctrl or Alt, change REQUIRE_MODIFIER_FOR_SHORTCUTS = true;
to REQUIRE_MODIFIER_FOR_SHORTCUTS = false;
(they still won't trigger if they are disabled as described above)Don't forget to save the script after you've made a change (Ctrl-S on Windows or ⌘ + S on macOS).
Two keyboard shortcuts are provided:
You can also set REQUIRE_MODIFIER_FOR_SHORTCUTS
to false
in the script to make these shortcuts trigger on M
and E
without Ctrl
or Alt
modifiers.
Mobile page, clean and readable:
Desktop page, extremely wide and with very long lines that reduce readability: