toggle-selection
Toggle current selected content in browser
Last updated 7 years 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

  • 1.0.6                                ...           latest (7 years ago)

7 Versions

  • 1.0.6                                ...           7 years ago
  • 1.0.5                                ...           8 years ago
  • 1.0.4                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

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