add feature: short url copy

This commit is contained in:
h4cd 2022-08-30 18:52:58 +08:00
parent 8774171658
commit 6bfd127dec
2 changed files with 5 additions and 0 deletions

View File

@ -186,6 +186,10 @@ function delete_url(url) {
});
}
function copy_url(url){
navigator.clipboard.writeText(url);
}
function reload_captcha() {
$.ajax({
type: "POST",

View File

@ -45,6 +45,7 @@
{{else}}
<a href="javascript:enable_url('{{.ShortUrl}}',true)">开启</a>
{{end}}
| <a href="javascript:copy_url('{{$.prefix}}{{.ShortUrl}}')">复制</a>
| <a href="javascript:delete_url('{{.ShortUrl}}')">删除</a>
| <a href="/admin/stats?url={{.ShortUrl}}" target="_blank">统计数据</a></td>
</tr>