Create bookmarklets in your browser with a simple copy and paste.
npm install bookmarkleter
var bookmarkleter = require('./bookmarkleter'); var bookmarklet = bookmarkleter(code, options);
All options are Boolean flags.
true): URL-encode reserved characters: [space], %, ", <, >, #, @, &, ?
false): Wrap in an IIFE (anonymizing function) to prevent exposing variables to the page on which the bookmarklet is running.
false): Minify using UglifyJS to reduce the size of the bookmarklet.
false): Make sure a modern version (>= 1.7) of jQuery is available for your code.
This is free software. It is released to the public domain without warranty.
Thanks to @jpillora for updates and contributions.