Fix copy link function (#133)

This commit is contained in:
Cotes Chung 2020-09-17 19:20:50 +08:00
parent 2cf5a58adf
commit 8484a34195

View file

@ -8,12 +8,10 @@
function copyLink(url) {
if (!url || 0 === url.length) {
return;
url = window.location.href;
}
url = window.location.href;
var $temp = $("<input>");
$("body").append($temp);
$temp.val(url).select();
document.execCommand("copy");