toggle-selection
Toggle current selected content in browser
Last updated 11 years ago by sudodoki .
MIT · Original npm · Tarball · package.json
$ cnpm 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 (9 years ago)

7 Versions

  • 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
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |