Skip to content

hifiwi-fi/bc-bookmarklet

Repository files navigation

@breadcrum/bookmarklet

Actions Status latest version Coverage Status

This is the bookmarklet for Breadcrum.net.

npm install bookmarklet

Usage

import getBookmarklet from '@breadcrum/bookmarklet'

const bookmarkletText = getBookmarklet({
  TARGET_URL: 'breadcrum.net',
  WINDOW_TITLE: 'Breadcrum'
})

Returns the bookmarklet text with simple runtime customizations so that environments can fix hard-coded variables.

How this works

esbuild used used to build standard, modular esm code into a minified iffi target, and then the reults are stored in a json document that gets customised with .replaceAll in the exported getBookmarklet function.

See also

This bookmarklet was based off of the following resources:

License

MIT