Browse Source

fixed copy to clipboard

tags/v1.0.0
Uvis Grinfelds 9 years ago
parent
commit
9f87fb789f
2 changed files with 5 additions and 12 deletions
  1. +1
    -9
      transfersh-web/download.image.html
  2. +4
    -3
      transfersh-web/scripts/main.js

+ 1
- 9
transfersh-web/download.image.html View File

@@ -51,15 +51,7 @@ include "includes/head.html"
<br/>
<div>

<a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp;
<a href="{{.Url}}" class="btn-cta btn"> download</i> </a>

<div id="copy-link-wrapper" class="copy-link-wrapper">
<p>Press Ctrl / CMD + C to copy link to your clipboard.</p>
<input readonly="readonly" type="text" value="{{.Url}}" />
</div>
<div id="overlay" class="overlay"></div>
</div>
include "includes/download-btn.html"
</section>




+ 4
- 3
transfersh-web/scripts/main.js 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() {


Loading…
Cancel
Save