mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Moves URLs to HTTPS
This commit is contained in:
parent
9e3d662c4e
commit
f700a1b12e
14
readme.md
14
readme.md
@ -5,7 +5,7 @@
|
||||
|
||||
> Modern copy to clipboard. No Flash. Just 3kb gzipped.
|
||||
|
||||
<a href="http://clipboardjs.com/"><img width="728" src="https://cloud.githubusercontent.com/assets/398893/16165747/a0f6fc46-349a-11e6-8c9b-c5fd58d9099c.png" alt="Demo"></a>
|
||||
<a href="https://clipboardjs.com/"><img width="728" src="https://cloud.githubusercontent.com/assets/398893/16165747/a0f6fc46-349a-11e6-8c9b-c5fd58d9099c.png" alt="Demo"></a>
|
||||
|
||||
## Why
|
||||
|
||||
@ -57,7 +57,7 @@ A pretty common use case is to copy content from another element. You can do tha
|
||||
|
||||
The value you include on this attribute needs to match another's element selector.
|
||||
|
||||
<a href="http://clipboardjs.com/#example-target"><img width="473" alt="example-2" src="https://cloud.githubusercontent.com/assets/398893/9983467/a4946aaa-5fb1-11e5-9780-f09fcd7ca6c8.png"></a>
|
||||
<a href="https://clipboardjs.com/#example-target"><img width="473" alt="example-2" src="https://cloud.githubusercontent.com/assets/398893/9983467/a4946aaa-5fb1-11e5-9780-f09fcd7ca6c8.png"></a>
|
||||
|
||||
```html
|
||||
<!-- Target -->
|
||||
@ -75,7 +75,7 @@ Additionally, you can define a `data-clipboard-action` attribute to specify if y
|
||||
|
||||
If you omit this attribute, `copy` will be used by default.
|
||||
|
||||
<a href="http://clipboardjs.com/#example-action"><img width="473" alt="example-3" src="https://cloud.githubusercontent.com/assets/398893/10000358/7df57b9c-6050-11e5-9cd1-fbc51d2fd0a7.png"></a>
|
||||
<a href="https://clipboardjs.com/#example-action"><img width="473" alt="example-3" src="https://cloud.githubusercontent.com/assets/398893/10000358/7df57b9c-6050-11e5-9cd1-fbc51d2fd0a7.png"></a>
|
||||
|
||||
```html
|
||||
<!-- Target -->
|
||||
@ -93,7 +93,7 @@ As you may expect, the `cut` action only works on `<input>` or `<textarea>` elem
|
||||
|
||||
Truth is, you don't even need another element to copy its content from. You can just include a `data-clipboard-text` attribute in your trigger element.
|
||||
|
||||
<a href="http://clipboardjs.com/#example-text"><img width="147" alt="example-1" src="https://cloud.githubusercontent.com/assets/398893/10000347/6e16cf8c-6050-11e5-9883-1c5681f9ec45.png"></a>
|
||||
<a href="https://clipboardjs.com/#example-text"><img width="147" alt="example-1" src="https://cloud.githubusercontent.com/assets/398893/10000347/6e16cf8c-6050-11e5-9883-1c5681f9ec45.png"></a>
|
||||
|
||||
```html
|
||||
<!-- Trigger -->
|
||||
@ -125,7 +125,7 @@ clipboard.on('error', function(e) {
|
||||
});
|
||||
```
|
||||
|
||||
For a live demonstration, open this [site](http://clipboardjs.com/) and just your console :)
|
||||
For a live demonstration, open this [site](https://clipboardjs.com/) and just your console :)
|
||||
|
||||
## Advanced Options
|
||||
|
||||
@ -162,13 +162,13 @@ clipboard.destroy();
|
||||
|
||||
This library relies on both [Selection](https://developer.mozilla.org/en-US/docs/Web/API/Selection) and [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) APIs. The first one is [supported by all browsers](http://caniuse.com/#search=selection) while the second one is supported in the following browsers.
|
||||
|
||||
| <img src="http://clipboardjs.com/assets/images/chrome.png" width="48px" height="48px" alt="Chrome logo"> | <img src="http://clipboardjs.com/assets/images/firefox.png" width="48px" height="48px" alt="Firefox logo"> | <img src="http://clipboardjs.com/assets/images/ie.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="http://clipboardjs.com/assets/images/opera.png" width="48px" height="48px" alt="Opera logo"> | <img src="http://clipboardjs.com/assets/images/safari.png" width="48px" height="48px" alt="Safari logo"> |
|
||||
| <img src="https://clipboardjs.com/assets/images/chrome.png" width="48px" height="48px" alt="Chrome logo"> | <img src="https://clipboardjs.com/assets/images/firefox.png" width="48px" height="48px" alt="Firefox logo"> | <img src="https://clipboardjs.com/assets/images/ie.png" width="48px" height="48px" alt="Internet Explorer logo"> | <img src="https://clipboardjs.com/assets/images/opera.png" width="48px" height="48px" alt="Opera logo"> | <img src="https://clipboardjs.com/assets/images/safari.png" width="48px" height="48px" alt="Safari logo"> |
|
||||
|:---:|:---:|:---:|:---:|:---:|
|
||||
| 42+ ✔ | 41+ ✔ | 9+ ✔ | 29+ ✔ | 10+ ✔ |
|
||||
|
||||
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.
|
||||
|
||||
For a live demonstration, open this [site](http://clipboardjs.com) on Safari.
|
||||
For a live demonstration, open this [site](https://clipboardjs.com) on Safari.
|
||||
|
||||
## License
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user