Testing hugo
This commit is contained in:
commit
e3975962fa
327 changed files with 17224 additions and 0 deletions
18
public/js/copyUrl.js
Normal file
18
public/js/copyUrl.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
document.getElementById("copyButton").addEventListener("click", copyToClipboard);
|
||||
|
||||
let currentUrl = window.location;
|
||||
let copyTextContainer = document.getElementById("copyText");
|
||||
let toolTip = document.getElementById("toolTip");
|
||||
|
||||
function copyToClipboard(){
|
||||
copyTextContainer.value = currentUrl
|
||||
copyTextContainer.focus();
|
||||
copyTextContainer.select();
|
||||
document.execCommand("copy");
|
||||
|
||||
toolTip.style.animationName = "pan-toolbar";
|
||||
|
||||
setTimeout(function(){
|
||||
toolTip.style.removeProperty('animation-name');
|
||||
}, 2000);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue