toggle-selection
Toggle current selected content in browser
Last updated 8 months ago by sudodoki .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install toggle-selection 
SYNC missed versions from official npm registry.

Toggle Selection

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.

Example

example recording

Current Tags

  • 2.1.0                                ...           latest (7 months ago)

9 Versions

  • 2.1.0                                ...           7 months ago
  • 2.0.0                                ...           8 months ago
  • 1.0.6                                ...           9 years ago
  • 1.0.5                                ...           10 years ago
  • 1.0.4                                ...           11 years ago
  • 1.0.3                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 44
Today 0
This Week 1
This Month 21
Last Day 0
Last Week 19
Last Month 7
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE