Skip to content

Commit

Permalink
finish copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
morizunzhu committed Feb 15, 2020
1 parent 3357be9 commit 125bb6c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public static function footer()
//版权相关
$copyright = $options->pluginUrl . '/SkyMo/js/copyright.js';
echo "<script src='$copyright'></script>";

//文本框打字机特效
$type = $options->pluginUrl . '/SkyMo/js/commentTyping.js';
echo "<script src='$type'></script>";


}
Expand Down
20 changes: 20 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,26 @@ h2.text-ellipsis>a, h3.text-ellipsis>a {
color: #000000d4;
}

/* 复制模态框 */

.swal-title:first-child {
margin-top: 0px;
}

.swal-title {
color: rgba(0, 0, 0, .65);
padding: 5px 5px;
font-size: 17px;
}

.swal-modal {
width: 250px;
background-color: #fff;
text-align: center;
border-radius: 5px;
margin: 20px auto;
}

/*
.panel div.b-light .panel div.b-light .panel div.b-light .panel div.b-light
Expand Down
2 changes: 2 additions & 0 deletions js/commentTyping.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion js/copyright.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
document.body.addEventListener('copy', function (e) {
if (window.getSelection().toString() && window.getSelection().toString().length > 42) {
setClipboardText(e);
swal({
title: '复制成功! 转载请注明出处',
timer: 700,
button:false
})
// alert('商业转载请联系作者获得授权,非商业转载请注明出处哦~\n谢谢合作~(。・`ω´・)');
}
});
Expand All @@ -30,7 +35,6 @@ function setClipboardText(event) {
+ '商业转载请联系作者获得授权,非商业转载请注明出处。\n'
+ '作者:' + author + '\n'
+ '链接:' + window.location.href + '\n';
console.log(textData);
clipboardData.setData('text/html', htmlData);
clipboardData.setData('text/plain', textData);
}
Expand Down

0 comments on commit 125bb6c

Please sign in to comment.