diff --git a/app/static/js/index.js b/app/static/js/index.js index b0d5afa..b5bee2c 100644 --- a/app/static/js/index.js +++ b/app/static/js/index.js @@ -3,7 +3,16 @@ $(document).ready(function () { $('.regen').on('click', function (e) { e.preventDefault(); - if(confirm('Are you sure to regenerate your password?')) + if (confirm('Are you sure to regenerate your password?')) $(this).closest("form").submit(); }); + + // class="click-to-copy": + $('.click-to-copy').on('click', function () { + var $temp = $(""); + $("body").append($temp); + $temp.val($(this).text()).select(); + document.execCommand("copy"); + $temp.remove(); + }); }); diff --git a/app/templates/index.html b/app/templates/index.html index a6ba43e..a7390fb 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -156,9 +156,9 @@
export http_proxy="https://{{escaped_email}}:{{user.vpnpassword}}@light.ustclug.org:29980/"; export https_proxy=$http_proxy;
export http_proxy="https://{{escaped_email}}:{{user.vpnpassword}}@light.ustclug.org:29980/"; export https_proxy=$http_proxy;
export http_proxy="http://{{escaped_email}}:{{user.vpnpassword}}@light.ustclug.org:29979/"; export https_proxy=$http_proxy;
export http_proxy="http://{{escaped_email}}:{{user.vpnpassword}}@light.ustclug.org:29979/"; export https_proxy=$http_proxy;