From 9f87fb789fbc88690bc88b02ec42335b0b0bcb20 Mon Sep 17 00:00:00 2001 From: Uvis Grinfelds Date: Thu, 6 Nov 2014 17:52:35 +0100 Subject: [PATCH] fixed copy to clipboard --- transfersh-web/download.image.html | 10 +--------- transfersh-web/scripts/main.js | 7 ++++--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/transfersh-web/download.image.html b/transfersh-web/download.image.html index b8021fb..df3d8f8 100644 --- a/transfersh-web/download.image.html +++ b/transfersh-web/download.image.html @@ -51,15 +51,7 @@ include "includes/head.html"
- copy link    - download - - -
-
+ include "includes/download-btn.html" diff --git a/transfersh-web/scripts/main.js b/transfersh-web/scripts/main.js index 379680a..6dfea5b 100644 --- a/transfersh-web/scripts/main.js +++ b/transfersh-web/scripts/main.js @@ -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() {