1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 21:53:26 +00:00

Fix code style

This commit is contained in:
Cotes Chung
2021-09-16 00:33:53 +08:00
parent f722757f6f
commit f411ba33d8
3 changed files with 9 additions and 8 deletions

View File

@@ -8,7 +8,6 @@
$(function() {
const btnSelector = '.code-header>button';
const ICON_DEFAULT = getIcon(btnSelector);
const ICON_SUCCESS = 'fas fa-check';
const ATTR_LOCKED = 'locked';
const TIMEOUT = 2000; // in milliseconds
@@ -24,6 +23,13 @@ $(function() {
placement: 'left'
});
function getIcon(btn) {
let iconNode = $(btn).children();
return iconNode.attr('class');
}
const ICON_DEFAULT = getIcon(btnSelector);
function setTooltip(btn) {
$(btn).tooltip('hide')
.tooltip('show');
@@ -35,11 +41,6 @@ $(function() {
}, TIMEOUT);
}
function getIcon(btn) {
let iconNode = $(btn).children();
return iconNode.attr('class');;
}
function setSuccessIcon(btn) {
let btnNode = $(btn);
let iconNode = btnNode.children();