Skip to content

Commit f411ba3

Browse files
committed
Fix code style
1 parent f722757 commit f411ba3

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

_javascript/utils/clipboard.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
$(function() {
1010
const btnSelector = '.code-header>button';
11-
const ICON_DEFAULT = getIcon(btnSelector);
1211
const ICON_SUCCESS = 'fas fa-check';
1312
const ATTR_LOCKED = 'locked';
1413
const TIMEOUT = 2000; // in milliseconds
@@ -24,6 +23,13 @@ $(function() {
2423
placement: 'left'
2524
});
2625

26+
function getIcon(btn) {
27+
let iconNode = $(btn).children();
28+
return iconNode.attr('class');
29+
}
30+
31+
const ICON_DEFAULT = getIcon(btnSelector);
32+
2733
function setTooltip(btn) {
2834
$(btn).tooltip('hide')
2935
.tooltip('show');
@@ -35,11 +41,6 @@ $(function() {
3541
}, TIMEOUT);
3642
}
3743

38-
function getIcon(btn) {
39-
let iconNode = $(btn).children();
40-
return iconNode.attr('class');;
41-
}
42-
4344
function setSuccessIcon(btn) {
4445
let btnNode = $(btn);
4546
let iconNode = btnNode.children();

assets/js/dist/page.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)