bookmarklets

A bookmarklet is a JavaScript program executed in the navigator (aka client-side).

It is based upon a URL like we generally use under the form https:// to navigate. Here we use the javascript: protocol.

We can work on the current document, select and extract specific or generic content. We can also do virtually anything we want using javascript and if the interest here is to focus on DOM extraction, we can also access and process any content that your browser can render as a plain text source (json files for instance).

It is a nice tool but it could also be a risk!

Check the source before executing it, especially when loading external resources (eg: screenshot uses html2canvas).


Generator

Generated href

Samples

  1. b64-txt
    Source code
    Comment
  2. bionic-reading
    Source code
  3. chrono
    Source code
  4. cnrtl-dict
    Source code
    Comment
  5. color-contrast
    Source code
    Comment
  6. color-dark
    Source code
  7. color-hex
    Source code
  8. color-invert-1
    Source code
  9. color-invert-2
    Source code
    Comment
  10. count-all
    Source code
    Comment
  11. count-element
    Source code
  12. dyslexize
    Source code
    Comment
  13. elements-cp
    Source code
    Comment
  14. file-extract
    Source code
    Comment
  15. frame-active
    Source code
  16. frame-hover
    Source code
    Comment
  17. images-cp
    Source code
  18. images-doc
    Source code
    Comment
  19. images-show
    Source code
  20. innertext-cp
    Source code
  21. last-modified
    Source code
  22. notetab
    Source code
    Comment
  23. osm-lat-long
    Source code
  24. osm-query
    Source code
  25. rss-find
    Source code
  26. rss-gen
    Source code
    Comment
  27. screenshot
    Source code
  28. text-spacing-rev
    Source code
    Comment
  29. translate-en-fr
    Source code
  30. txt-b64
    Source code
    Comment
  31. wayback
    Source code
  32. wiki-fr
    Source code
    Comment

Tips?

  • About the selection input:
    You can choose to open your link even when there is no selection. That's a shortcut \o/.

  • About the input method:
    You may not need any input and put all the parameters at once (you can manage your own versionning). You can also use the prompt() method to grab your input on the fly.

  • About the extract method:
    You can choose to extract any content from the document via either your clipboard, a console log, a message alert or a file download.


Resources

  1. Make bookmarklets
  2. Accessibility bookmarklets
  3. Bronco's bookmarklet generator
  4. Bronco's bookmarklets
  5. Dan's bookmarklets
  6. Damako4's bookmarklets
  7. Thomas Orlita's bookmarklets
  8. Satisfice's bookmarklets
  9. GreaseMonkey's Firefox extension for Ytube