emtee40/bookmarkleter
Cloned from: https://github.com/alanhogan/bookmarkleter
Bookmarkleter
You have JavaScript. You need a bookmarklet. This does that.
Browser tool
Create bookmarklets in your browser with a simple copy and paste.
https://chriszarate.github.io/bookmarkleter/
https://alanhogan.github.io/bookmarkleter/ <---a variation
NPM module
npm install --save bookmarkleter
const bookmarkleter = require( 'bookmarkleter' );
const bookmarklet = bookmarkleter( code, options );Options
All options are Boolean flags.
-
urlencode(defaulttrue): URL-encode reserved characters: [space], %,
", <, >, #, @, &, ? -
iife(defaultfalse): Wrap in an IIFE (anonymizing function) to
prevent exposing variables to the page on which the bookmarklet is running. -
minify(defaultfalse): Minify using babel-minify to
reduce the size of the bookmarklet. -
transpile(defaultfalse): Transpile to ES5 using Babel. -
jQuery(defaultfalse): Make sure a modern version (>= 1.7) of
jQuery is available for your code.
License
This is free software. It is released to the public domain without warranty.
Thanks
Thanks to @jpillora and @alanhogan for updates and contributions.