diff --git a/dist/utils.js b/dist/utils.js
index 3e17af8..326fc74 100644
--- a/dist/utils.js
+++ b/dist/utils.js
@@ -291,6 +291,14 @@ function embed(){
let newHash = document.location.hash.replace(/[&]?pos=[0-9\.-]+,[0-9\.-]+,[0-9\.-]+/,'')
newHash += `&${lastPos}`
document.location.hash = newHash.replace(/&&/,'&')
+ // copy url to clipboard
+ var dummy = document.createElement('input'),
+ text = window.location.href;
+ document.body.appendChild(dummy);
+ dummy.value = text;
+ dummy.select();
+ document.execCommand('copy');
+ document.body.removeChild(dummy);
// End of *TODO*
window.notify(`Link copied to clipboard! ❤️ ps. to embed this experience in your website, copy/paste the following into your HTML: `,{timeout:10000})
}
diff --git a/example/assets/js/utils.js b/example/assets/js/utils.js
index 4663137..b0602b6 100644
--- a/example/assets/js/utils.js
+++ b/example/assets/js/utils.js
@@ -291,6 +291,14 @@ export function embed(){
let newHash = document.location.hash.replace(/[&]?pos=[0-9\.-]+,[0-9\.-]+,[0-9\.-]+/,'')
newHash += `&${lastPos}`
document.location.hash = newHash.replace(/&&/,'&')
+ // copy url to clipboard
+ var dummy = document.createElement('input'),
+ text = window.location.href;
+ document.body.appendChild(dummy);
+ dummy.value = text;
+ dummy.select();
+ document.execCommand('copy');
+ document.body.removeChild(dummy);
// End of *TODO*
window.notify(`Link copied to clipboard! ❤️ ps. to embed this experience in your website, copy/paste the following into your HTML: `,{timeout:10000})
}