An open API service indexing awesome lists of open source software.

https://github.com/iafan/linktoselection

Allow your website visitors to deep-link to any selected page content
https://github.com/iafan/linktoselection

bookmarking deep-linking javascript plugin

Last synced: over 1 year ago
JSON representation

Allow your website visitors to deep-link to any selected page content

Awesome Lists containing this project

README

          

### About LinkToSelection

Sometimes you want to share a link that points to a specific text on a page, or an image.
This script, when plugged into a page, will do just that.

Upon selecting something on a page, you will see #sel:xxxxxxxxxxxx hash
added to the page URL. Send the resulting link to someone else, and they will open the
page with the same selection restored and scrolled into view.

### Best Use Cases

__Documentation__: enabling selection sharing this on your documentation website will allow you to point others to specific phrases or words.

__Reporting errors__: your users can send you links to typos or other kinds of errors that they find on your website pages.

### Demo

Try any of these links that point to a specific selected content on [serge.io](https://serge.io/) website:

* [Link to a phrase](https://serge.io/#sel:ZGl2L2Rpdi4yL2Rpdi4zL2Rpdi9wLjEvQDoxMDctKjoxNjQ)
* [Link to a section](https://serge.io/docs/dev/callbacks/#sel:I2JlZm9yZV91cGRhdGVfZGF0YWJhc2VfZnJvbV9zb3VyY2VfZmlsZXMvYS1kaXYvZGl2LjIvZGl2L2Rpdi4xL3AuNy9ALjE6MTIw)
* [Link to an image](https://serge.io/docs/localization-cycle/#sel:ZGl2L2Rpdi4yL2Rpdi9kaXYuMS9wLjItKjox)

### Usage

Just put the `LinkToSelection.min.js` file to an appropriate folder of your website, e.g. `/static/js/vendor/` and add the following script to the bottom of your web pages (before the closing `