Jump to content

User:Enterprisey/superjump

From Wikipedia, the free encyclopedia
superjump
Author(s)Enterprisey
StatusStable
UpdatedJuly 28, 2019; 5 years ago (2019-07-28)
BrowsersFirefox
SkinsVector
SourceUser:Enterprisey/superjump.js

Custom keyboard shortcuts to go to any page, and more!

Usage

[edit]

You'll have to write a configuration file in the form of JSON. It'll be at Special:MyPage/superjump-config.json. You can see an example at User:Enterprisey/superjump-config.json. There is a tool available to write configuration files automatically, so you don't have to deal with JSON: toollabs:apersonbot/superjump-configurer.

Once you've written a configuration, press the keyboard shortcuts on any page and they should work. Important gotcha: at the "first level" of keyboard shortcuts, you must use your browser's access keys. See WP:KBD for what those are (and a list of the many default MediaWiki shortcuts - you can override those defaults with this script).

For example, if my configuration looked like {"a": "Main Page"} and I were using Chrome on Windows, I would press Alt+Shift+A to go to the Main Page. Further levels do not require the extra keys. For example, if I had {"a": {"b": "Main Page"}}, I would press Alt+Shift+A, then release those keys, then press just B.

If you want to write configuration manually, the format is simple. It's just a JSON dictionary; the keys are the keys (funny how that worked out), and each value is either a string (a page name, to navigate there), or a dictionary (a submenu). Submenus can be arbitrarily nested, although you might get bored of pressing the keys. Example configurations:

  • {"a": "Main Page"} - press access key "A" to go to the Main Page.
  • {"a": {"a": "0", "b": "1"}, "b": {"a": "2", "b": "3"}} - press either access key "A" or "B" to open a submenu.

Installation instructions

[edit]

Hint: It's much easier if you get ScriptInstaller, then navigate to User:Enterprisey/superjump.js and click "Install" at the top.

However, here's the manual method:

  1. Place {{subst:iusc|User:Enterprisey/superjump.js}} on Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js.
  2. Clear your cache and enjoy!

See also

[edit]