2020-10-08, updated: 2021-07-22
Tested with Nyxt 2 Pre-release 3.
Wikipedia provides a succinct introduction and historical context:
Unlike in typical browsers, bookmarklets are not second-class citizens relegated to bookmarks- they are first-class commands! Because of their status in Nyxt, you can:
Defining bookmarklets in Nyxt is straightforward:
- A name for your bookmarklet, this corresponds to its function/command
- A documentation string describing what the bookmarklet does
… and that's it!
We've included a collection of Bookmarklets we think would be useful in our
bookmarklets.lisp file. They include commands to:
color-internal-external-links: Color internal links red, external links blue, and in-page links orange.
urls-as-link-text: Changes the text of links to match their absolute URLs.
hide-visited-urls: Hide visited URLs.
toggle-checkboxes: Toggle all checkboxes.
view-password-field-contents: View passwords on page.
show-hidden-form-elements: Show hidden form elements.
enlarge-textareas: Increase height of all text areas by 5 vertical lines.
show-textbox-character-count: Displays a running count of the characters in each textbox.
highlight-regexp: Highlights each match for a regular expression.
zoom-images-in: Zoom images in.
zoom-images-out: Zoom images out.
sort-table: Sort a table alphabetically.
number-table-rows: Add numbers to table rows.
number-lines: Numberlines in plaintext documents and PRE tags.
transpose-tables: Transpose all table row and columns.
remove-color: Remove color from web pages.
remove-images: Remove images from web pages.
hue-shift-positive: Shift the colors of the web page with a positive hue.
hue-shift-negative: Shift the colors of the web page with a negative hue.
increase-brightness: Increase the brightness of the web page.
decrease-brightness: Decrease the brightness of the web page.
invert-color: Invert the color of the web page.
The currently provided bookmarklets were sourced from Jesse Ruderman's public domain works.
A great illustration of how useful bookmarklets can be is shown below. We start with the Wikipedia page for Salmon.
After executing our
sort-table bookmarklet, every single table has a header above it that we can use to sort the elements in the table alphabetically, by column.
We were then able to click and sort by "Scientific Name".
We hope you enjoy using these bookmarklets and find many more to add to your collection!
Thanks for reading :-)
Did you enjoy this article? Register for our newsletter to receive the latest hacker news from the world of Lisp and browsers!
- Maximum one email per month
- Unsubscribe at any time