Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nh-copy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nh-copy

Support copy text to clipboard without flash

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

nh-copy

A complete solution to copy text in browser.

It uses zeroClipboard by default to perform copy operation, if browser do not support flash use document.execCommand() instead.

#Test this example

bower install

Open index.html.

#Support browser Using zeroClipboard and document.execCommand().

  • IE9+
  • Firefox 41+ (tested in Firefox 41, OS: ubuntu 14.04 64bit)
  • Chrome 43+ (tested in Chrome 45, OS: ubuntu 14.04 64bit)

Using document.execCommand() only.

  • IE9+
  • Firefox 41+ (tested in Firefox 41, OS: ubuntu 14.04 64bit)
  • Chrome 43+ (tested in Chrome 45, OS: ubuntu 14.04 64bit)

#How it works? If flash is supported use zeroClipboard to perform copy operation. else check if firefox 41+ or chrome 43+ using document.execCommand() and selection API instead.

#To do

  • Make sure chrome and firefox version detect function always work properly.
  • Support setting to use document.execCommand() only.
  • Format source code to easy further customization.
  • Add website to use this example.

Reference:

license MIT.

FAQs

Package last updated on 20 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc