clipboard-inserter
clipboard-inserter copied to clipboard
Patch to fix deprecated execCommand
execCommand
seems to be deprecated and is no longer working on the latest Firefox release. This patch fixes it by using the newer clipboard API instead.
Notes:
- I haven't tested this out on any browser other than Firefox, but the caniuse page shows that it works the latest versions of basically all browsers outside of IE11, so I assume it works.
- With the newer API, I don't think the
paste-target
div is actually needed anymore, but I kept it here just in case. - I'm leaving the version bumping (in
manifest.json
) up to you. - Fixes #14
EDIT: For people who want an updated/rewritten alternative that works on Firefox, see lap-clipboard-inserter.