About
editBookmarks is a small script that generates a bookmarks section above the Contribute section of the sidebar. You can edit your bookmarks at Special:MyPage/bookmarks.json.
Installing
editAdd {{subst:lusc|User:Sportzpikachu/bookmarks.js}}
to your common.js file. Ignore the error and save the file.
Editing your bookmarks.json file
editCopy this template to the file:
[{"name": "Bookmark Name", "url": "Bookmark Url"}]
Replace Bookmark Name
with the name of the bookmark (e.g. Main Page
or Me
), and Bookmark Url
with the URL of the bookmark (e.g. Main_Page
or Special:MyPage
). To add another bookmark, copy this template:
, {"name": "Bookmark Name", "url": "Bookmark Url"}
and paste it behind the last }
. See the below examples if you need help.
You can add an access key to any bookmark by adding
, "accesskey": "k"
behind the url parameter. Access keys are optional, you can add them to some and not others. See the below examples if you need help.
Examples
edit[ { "name": "Main Page", "url": "Main_Page" }, { "name": "Me", "url": "Special:MyPage" } ]
Access Keys
edit[ { "name": "Access Keys are cool!", "url": "WP:K", "accesskey": "k"}, { "name": "common.js", "url": "Special:MyPage/common.js", "accesskey": "c" }, { "name": "Some page without access keys", "url": "Hello World"} ]
Bugs/Feature requests
editAdd bug reports or feature requests on the talk page.
Known bugs
editNone.
Feature requests TODO
edit- Add a UI for editing bookmarks
- Ability to collapse bookmarks