User:Sportzpikachu/bookmarks

From Wikipedia, the free encyclopedia

About[edit]

Bookmarks is a small script that generates a bookmarks section underneath the Tools section. You can edit your bookmarks at Special:MyPage/bookmarks.json.

Installing[edit]

Add {{subst:lusc|User:Sportzpikachu/bookmarks.js}} to your common.js file. Ignore the error and save the file.

Editing your bookmarks.json file[edit]

Copy 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.

Access Keys[edit]

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[edit]

Add bug reports or feature requests on the talk page.

Known bugs[edit]

None.

Feature requests TODO[edit]

  • Add a UI for editing bookmarks
  • Ability to collapse bookmarks