mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Adds bonus section
This commit is contained in:
parent
f53eb02353
commit
97bb825d40
@ -212,6 +212,12 @@ clipboard.destroy();</code></pre>
|
||||
<p>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 <code>Copied!</code> when <code>success</code> event is called and <code>Press Ctrl+C to copy</code> when <code>error</code> event is called because the text is already selected.</p>
|
||||
|
||||
<p>You can also check if clipboard.js is supported or not by running <code>Clipboard.isSupported()</code>, that way you can hide copy/cut buttons from the UI.</p>
|
||||
|
||||
<h1 id="bonus">Bonus</h1>
|
||||
|
||||
<p>A browser extension that adds a "copy to clipboard" button to every code block on <em>GitHub, MDN, Gist, StackOverflow, StackExchange, npm, and even Medium.</em></p>
|
||||
|
||||
<p>Install for <a href="https://chrome.google.com/webstore/detail/codecopy/fkbfebkcoelajmhanocgppanfoojcdmg">Chrome</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/codecopy/">Firefox</a>.</p>
|
||||
</main>
|
||||
|
||||
<footer class="footer gradient text-center">
|
||||
|
Loading…
x
Reference in New Issue
Block a user