fixed copy to clipboard

This commit is contained in:
Uvis Grinfelds
2014-11-06 17:52:35 +01:00
parent 7249b90d7c
commit 9f87fb789f
2 changed files with 5 additions and 12 deletions

View File

@@ -109,6 +109,7 @@ $(document).ready(function() {
copylink = document.getElementById("copy-link-wrapper"),
overlay = document.getElementById("overlay");
var url = "http://url"
copylinkbtn.addEventListener("click", function() {
var error = document.getElementsByClassName('error');
@@ -119,9 +120,9 @@ $(document).ready(function() {
document.body.className += ' active';
copylink.children[2].value = window.location.href;
copylink.children[2].focus();
copylink.children[2].select();
copylink.children[1].value = url;
copylink.children[1].focus();
copylink.children[1].select();
}, false);
overlay.addEventListener("click", function() {