hise

Inject <script> to expand DOM selection on mouse-up

Usage no npm install needed!

<script type="module">
  import hise from 'https://cdn.skypack.dev/hise';
</script>

README

npm

hise

Build Status Dependency Status

Inject <script> to expand DOM selection on mouse-up.

hise reads HTML or plaintext from input file and adds a <script> tag that, when viewing in a web browser, will add an event listener to highlight matching text on mouse selection.

Example

# wrap arbitrary output
$ ps --sort=pcpu | head | hise -r

# with source-highlight
$ source-highlight -i index.js | hise

# with marked
$ marked README.md | hise

Hint: use bcat to pipe HTML output to a browser tab.

CLI

hise [option]... [<file>]

Appends the script to an HTML page. If input is not HTML but plaintext, wraps it in <pre> first.

Reads <file> or stdin, writes to stdout.

Option: --raw, -r

Wrap input stream in a <pre> tag.

Option: --ignore-case, -i

Ignore case when matching a string.

Install

npm install -g hise

License

MIT