Skip to content

Commit a4c7d3c

Browse files
committed
Enhanced JS function.
1 parent 7e9fb16 commit a4c7d3c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

assets/js/_src/_commons/copy-link.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
* MIT License
77
*/
88

9-
function copyLink() {
10-
var url = window.location.href;
9+
function copyLink(url) {
10+
if (!url || 0 === url.length)
11+
url = window.location.href;
1112
var $temp = $("<input>");
1213

1314
$("body").append($temp);

assets/js/dist/_commons/copy-link.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)