You have JavaScript. You need a bookmarklet. This does that.
You have JavaScript. You need a bookmarklet. This does that.
Create bookmarklets in your browser with a simple copy and paste.
https://chriszarate.github.io/bookmarkleter/
npm install --save bookmarkleter
const bookmarkleter = require( 'bookmarkleter' );
const bookmarklet = bookmarkleter( code, options );
All options are Boolean flags.
urlencode
(default true
): URL-encode reserved characters: [space], %,
", <, >, #, @, &, ?
iife
(default false
): Wrap in an IIFE (anonymizing function) to
prevent exposing variables to the page on which the bookmarklet is running.
mangleVars
(default false
): Mangle variable names and other tokens to
further reduce size.
transpile
(default false
): Transpile for browsers using Babel.
jQuery
(default false
): Make sure a modern version (>= 1.7) of
jQuery is available for your code.
minify
: Code is always minified (with comments removed) usingmangleVars
option for additional compactness.This is free software. It is released to the public domain without warranty.
Thanks to @jpillora and @alanhogan for updates and contributions.