Passed
Push — master ( e4f13f...46daff )
by Takashi
02:18
created

web/js/post/default.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 15
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
nc 1
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 3
mnd 1
bc 3
fnc 2
bpm 1.5
cpm 1.5
noi 1
1
$(function () {
2
    $('#esa-content-body .code-block pre.plaintext code').addClass('nohighlight');
3
    hljs.initHighlightingOnLoad();
0 ignored issues
show
Bug introduced by
The variable hljs seems to be never declared. If this is a global, consider adding a /** global: hljs */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
4
5
    $('#esa-content-body table')
6
        .addClass('table table-bordered table-striped')
7
        .each(function () {
8
            // decrease font-size when the number of column is 5 or more
9
            var tr = $(this).find('tr').get(0);
10
            if ($(tr).find('td, th').length >= 5) {
11
                $(this).css('font-size', '0.9em');
12
            }
13
        })
14
    ;
15
});
16