File tree 1 file changed +4
-6
lines changed 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
const domReady = function ( callback ) {
2
2
const state = document . readyState ;
3
- if ( state === 'interactive' || state === 'complete' ) {
3
+ if ( state === 'interactive' || state === 'complete' ) {
4
4
callback ( ) ;
5
- }
6
- else {
5
+ } else {
7
6
document . addEventListener ( 'DOMContentLoaded' , callback ) ;
8
7
}
9
8
} ;
10
9
11
-
12
10
domReady ( ( ) => {
13
11
const projectname = document . createElement ( 'a' ) ;
14
12
projectname . classList . add ( 'project-name' ) ;
15
13
projectname . text = 'aureooms/js-set-partition' ;
16
14
projectname . href = './index.html' ;
17
15
18
16
const header = document . querySelector ( 'header' ) ;
19
- header . insertBefore ( projectname , header . firstChild ) ;
17
+ header . insertBefore ( projectname , header . firstChild ) ;
20
18
21
19
const testlink = document . querySelector ( 'header > a[data-ice="testLink"]' ) ;
22
20
testlink . href = 'https://coveralls.io/github/aureooms/js-set-partition' ;
@@ -25,7 +23,7 @@ domReady(() => {
25
23
const searchBox = document . querySelector ( '.search-box' ) ;
26
24
const input = document . querySelector ( '.search-input' ) ;
27
25
28
- // active search box when focus on searchBox.
26
+ // Active search box when focus on searchBox.
29
27
input . addEventListener ( 'focus' , ( ) => {
30
28
searchBox . classList . add ( 'active' ) ;
31
29
} ) ;
You can’t perform that action at this time.
0 commit comments