parent
bbf90e77e9
commit
f6996a2274
4 changed files with 23 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||||
|
const yank = (win) => { |
||||||
|
let input = win.document.createElement('input'); |
||||||
|
win.document.body.append(input); |
||||||
|
|
||||||
|
input.style.position = 'fixed'; |
||||||
|
input.style.top = '-100px'; |
||||||
|
input.value = win.location.href; |
||||||
|
input.select(); |
||||||
|
|
||||||
|
win.document.execCommand('copy'); |
||||||
|
|
||||||
|
input.remove(); |
||||||
|
}; |
||||||
|
|
||||||
|
export { yank }; |
Reference in new issue