copy-to-clipboard

Copy stuff into clipboard from your browser using JS

MIT License

Downloads
22.3M
Stars
1.3K
Committers
18

Bot releases are hidden (Show)

copy-to-clipboard - Latest Release

Published by sudodoki about 2 years ago

  • #116 fix npm audit
  • #119 add aria hidden attribute
copy-to-clipboard - v3.3.1 Quickfix

Published by sudodoki over 4 years ago

Fix d.ts issue #96 by @zombieJ

copy-to-clipboard -

Published by sudodoki over 4 years ago

This is broken for ts users, sorry.

copy-to-clipboard -

Published by sudodoki over 4 years ago

  • #93 fix issue with setting any format via options.format in IE11. Thanks to @wdlb
copy-to-clipboard -

Published by sudodoki over 5 years ago

  • #79 ability to force specific type for data transfer contributed by @sloanesturz (and special thanks to @julienw for kicking this off)
copy-to-clipboard -

Published by sudodoki over 5 years ago

  • #76 by @julienw (this might be breaking if you had 'copy' event handler on body for this), reasoning in #75
  • update example.js (bundled via uglifyjs)
  • ran prettier
copy-to-clipboard - Update toggle-selection min version

Published by sudodoki over 5 years ago

Now "toggle-selection": "^1.0.6" (instead of ^1.0.3

copy-to-clipboard -

Published by sudodoki about 7 years ago

copy-to-clipboard -

Published by sudodoki about 7 years ago

copy-to-clipboard -

Published by sudodoki over 7 years ago

#45 by @shvaikalesh
#48 by @pugnascotia

copy-to-clipboard -

Published by sudodoki over 8 years ago

Fixes:

Enhancement:

Docs:

  • Added note on Safari 8 and prompt. (Maybe, should add workaround with selection & 'press cmd+c' tooltip or similar instead of prompt/)
  • Updated API regarding return value.
copy-to-clipboard -

Published by sudodoki over 8 years ago

Testing

Added e2e testing running on saucelabs, which worked for, like, 2 weeks (not long enough to see this release).
There're issues with chrome-driver not supporting keyboard events on mac
There's issue with pasting multiline text with tags in different browsers having extra newline in some browsers.
Would appreciate help fixing this up. There's need to include geckodriver now to run test in default FF browser + figure out whether we can use applescript similar to following snippet

const applescript = require('applescript');
const script = 'tell application "Chrome"\n' +
  'activate\n' +
  'tell application "System Events"\n' +
    'keystroke "v" using {command down}\n' +
'end tell\n' +
'end tell';

on Saucelabs

Other fixes

  • Fix for the case when body has user-select: none styles - it doesn't inherit it. Thanks to @shvaikalesh
  • Feature ā€“ message option passed to copy would have #{key} interpolated corresponding platform key (āŒ˜+C for macOS/iOS, Ctrl+C otherwise). Thanks to @shvaikalesh yet again for this one.
copy-to-clipboard -

Published by sudodoki over 8 years ago

copy-to-clipboard -

Published by sudodoki over 8 years ago

copy-to-clipboard -

Published by sudodoki over 8 years ago

Removing options.cb option.

copy-to-clipboard -

Published by sudodoki over 8 years ago

  • Added options.cb: callback to be executed after copy #22.
  • Added Mac OS detection to set prompt to 'Press āŒ˜+Cā€¦' #24
copy-to-clipboard -

Published by sudodoki over 8 years ago

  • Added options: debug (console.error is surpassed by default) and promprt (to specify string in prompt - default is 'Copy to clipboard: Ctrl+C, Enter'). Contribution by @evenchange4
  • Switched back to using textContent to work around issues with trying to copy content that needed escaping, but preserving newline to be able to copy multiline text. Idea by @shvaikalesh