1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-19 14:14:17 +00:00

Feature: Added post sharing options.

Also added a license statement at the bottom of the posts.
This commit is contained in:
Cotes Chung
2020-02-17 03:01:48 +08:00
parent 2ad56cf249
commit 840eab9566
11 changed files with 219 additions and 27 deletions

View File

@@ -0,0 +1,19 @@
/*
* Copy current page url to clipboard.
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT License
*/
function copyLink() {
var url = window.location.href;
var $temp = $("<input>");
$("body").append($temp);
$temp.val(url).select();
document.execCommand("copy");
$temp.remove();
alert("Link copied successfully!");
}