0.0.4 • Published 2 years ago

qref v0.0.4

Weekly downloads
-
License
CC0-1.0
Repository
github
Last release
2 years ago

Qref

Qref is a JavaScript addon that adds selection permalinking to an HTML page.

See https://manuals.quinngrier.com/bash/4.1/bashref.html for an example of Qref in action. This is a copy of the Bash 4.1 manual with Qref added on. When you select some text, a permalink popup will appear at the beginning of the selection. When you open the permalink, the selection will be highlighted and scrolled into view. This lets you create permalinks to arbitrary parts of the page.

Multiple selection permalinks can be created in browsers that natively support multiple selection (e.g., using the Ctrl key in Firefox), or by manually combining multiple permalinks. To combine multiple permalinks, add all of the qref= parameters to the same URL, separating them with & characters, or collapse them into a single qref= parameter, separating the values with + characters. For example, the following two permalinks are equivalent:

To add Qref to an HTML page, simply add it to the bottom of the <head> element as follows:

<head>
  ...
  <script defer src="https://cdn.jsdelivr.net/npm/qref"></script>
</head>

You can also pin it to a specific version number:

<script defer src="https://cdn.jsdelivr.net/npm/qref@0.0.4"></script>

You can also download and serve it locally:

<script defer src="qref.js"></script>

Qref has no dependencies and does not make any web requests. All you need is qref.js.

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago