Travis build: 694 [ci skip]

This commit is contained in:
Travis CI
2017-12-31 10:16:51 +00:00
parent e1adedcae6
commit 7de90c6563
3 changed files with 65 additions and 3 deletions

View File

@ -16,7 +16,8 @@ const copyToClipboard = str => {
el.style.position = 'absolute';
el.style.left = '-9999px';
document.body.appendChild(el);
const selected = document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;
const selected =
document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;
el.select();
document.execCommand('copy');
document.body.removeChild(el);
@ -24,7 +25,7 @@ const copyToClipboard = str => {
document.getSelection().removeAllRanges();
document.getSelection().addRange(selected);
}
}
};
```
```js