![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | example/ | 10 years ago | - | |
![]() | README.md | 10 years ago | 547 | |
![]() | index.js | 9 years ago | 780 | |
![]() | package.json | 2 years ago | 1.7K |
Simple module exposing function that deselects current browser selection and returns function that restores selection.
var deselect = require('toggle-selection');
var reselect = deselect(); // remove all selection
// …
// do something with current selection, text, etc;
// …
reselect(); // restore selection
All credits go to @shvaikalesh.