Productivity
All toolsBookmarklet Generator
Wrap JavaScript into a properly encoded javascript: bookmarklet.
JavaScript code
Bookmarklet URL
javascript:(function()%7Bdocument.querySelectorAll('a').forEach(a%20%3D%3E%20a.style.outline%20%3D%20'2px%20solid%20red')%3B%7D)()%3BDrag to bookmarks bar
Drag the button above into your browser's bookmarks bar.
Frequently asked questions
- What is a bookmarklet?
- A bookmarklet is a browser bookmark whose URL is JavaScript code starting with javascript:. Clicking it runs the script on whatever page you are viewing.
- How do I install the generated bookmarklet?
- Drag the generated link to your bookmarks bar, or right-click and choose add to bookmarks. From then on, clicking it runs your script on the current page.
- Why do modern sites sometimes block bookmarklets?
- Strict Content Security Policy headers can prevent inline scripts from running on some sites. There is no workaround from the bookmarklet side, but most pages still allow them.