Skip to content

Commit 0e4333c

Browse files
📚 docs: Format header script with xo.
1 parent e82c30b commit 0e4333c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/scripts/header.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
const domReady = function (callback) {
22
const state = document.readyState;
3-
if ( state === 'interactive' || state === 'complete' ) {
3+
if (state === 'interactive' || state === 'complete') {
44
callback();
5-
}
6-
else {
5+
} else {
76
document.addEventListener('DOMContentLoaded', callback);
87
}
98
};
109

11-
1210
domReady(() => {
1311
const projectname = document.createElement('a');
1412
projectname.classList.add('project-name');
1513
projectname.text = 'aureooms/js-set-partition';
1614
projectname.href = './index.html';
1715

1816
const header = document.querySelector('header');
19-
header.insertBefore(projectname,header.firstChild);
17+
header.insertBefore(projectname, header.firstChild);
2018

2119
const testlink = document.querySelector('header > a[data-ice="testLink"]');
2220
testlink.href = 'https://coveralls.io/github/aureooms/js-set-partition';
@@ -25,7 +23,7 @@ domReady(() => {
2523
const searchBox = document.querySelector('.search-box');
2624
const input = document.querySelector('.search-input');
2725

28-
// active search box when focus on searchBox.
26+
// Active search box when focus on searchBox.
2927
input.addEventListener('focus', () => {
3028
searchBox.classList.add('active');
3129
});

0 commit comments

Comments
 (0)