scratch

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 124  →  ?path2? @ 125
/bower_components/clipboard/readme.md
@@ -21,14 +21,8 @@
npm install clipboard --save
```
 
Or bower, too.
Or if you're not into package management, just [download a ZIP](https://github.com/zenorocha/clipboard.js/archive/master.zip) file.
 
```
bower install clipboard --save
```
 
If you're not into package management, just [download a ZIP](https://github.com/zenorocha/clipboard.js/archive/master.zip) file.
 
## Setup
 
First, include the script located on the `dist` folder or load it from [a third-party CDN provider](https://github.com/zenorocha/clipboard.js/wiki/CDN-Providers).
@@ -151,6 +145,14 @@
});
```
 
For use in Bootstrap Modals or with any other library that changes the focus you'll want to set the focused element as the `container` value.
 
```js
new Clipboard('.btn', {
container: document.getElementById('#modal')
});
```
 
Also, if you are working with single page apps, you may want to manage the lifecycle of the DOM more precisely. Here's how you clean up the events and objects that we create.
 
```js
@@ -170,6 +172,12 @@
 
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](https://chrome.google.com/webstore/detail/codecopy/fkbfebkcoelajmhanocgppanfoojcdmg) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/codecopy/).
 
## License
 
[MIT License](http://zenorocha.mit-license.org/) © Zeno Rocha