From 97bb825d4049a190c28a2cb8042af40d4b220beb Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Sun, 30 Apr 2017 20:17:10 -0700 Subject: [PATCH] Adds bonus section --- index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.html b/index.html index b29e630..c591ada 100644 --- a/index.html +++ b/index.html @@ -212,6 +212,12 @@ clipboard.destroy();

The good news is that clipboard.js gracefully degrades if you need to support older browsers. All you have to do is show a tooltip saying Copied! when success event is called and Press Ctrl+C to copy when error event is called because the text is already selected.

You can also check if clipboard.js is supported or not by running Clipboard.isSupported(), that way you can hide copy/cut buttons from the UI.

+ +

Bonus

+ +

A browser extension that adds a "copy to clipboard" button to every code block on GitHub, MDN, Gist, StackOverflow, StackExchange, npm, and even Medium.

+ +

Install for Chrome and Firefox.