User:Enterprisey/superjump
Author(s) | Enterprisey |
---|---|
Status | Stable |
Updated | July 28, 2019 |
Browsers | Firefox |
Skins | Vector |
Source | User: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:
- Place
{{subst:iusc|User:Enterprisey/superjump.js}}
on Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js. - Clear your cache and enjoy!