|
|
il y a 2 mois | |
|---|---|---|
| .. | ||
| example | il y a 2 mois | |
| .npmignore | il y a 2 mois | |
| README.md | il y a 2 mois | |
| index.js | il y a 2 mois | |
| package.json | il y a 2 mois | |
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.