Skip to content

Commit 746d93a

Browse files
🤖 chore: Lint source files.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/9b50c2a1d7e9ab7b4bc9c9ff88892e98c5f62244/src/transforms/sources:initial-lint.js Please contact the author of the transform if you believe there was an error.
1 parent 4edc769 commit 746d93a

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

doc/scripts/header.js

+19-22
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
var domReady = function(callback) {
2-
var state = document.readyState ;
3-
if ( state === 'interactive' || state === 'complete' ) {
4-
callback() ;
5-
}
6-
else {
1+
const domReady = function (callback) {
2+
const state = document.readyState;
3+
if (state === 'interactive' || state === 'complete') {
4+
callback();
5+
} else {
76
document.addEventListener('DOMContentLoaded', callback);
87
}
9-
} ;
10-
8+
};
119

12-
domReady(function(){
13-
14-
var projectname = document.createElement('a');
10+
domReady(function () {
11+
const projectname = document.createElement('a');
1512
projectname.classList.add('project-name');
1613
projectname.text = 'data-structure/skip-list';
17-
projectname.href = './index.html' ;
14+
projectname.href = './index.html';
1815

19-
var header = document.getElementsByTagName('header')[0] ;
20-
header.insertBefore(projectname,header.firstChild);
16+
const header = document.querySelectorAll('header')[0];
17+
header.insertBefore(projectname, header.firstChild);
2118

22-
var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
23-
testlink.href = 'https://coveralls.io/github/data-structures-and-algorithms/skip-list' ;
24-
testlink.target = '_BLANK' ;
19+
const testlink = document.querySelector('header > a[data-ice="testLink"]');
20+
testlink.href =
21+
'https://coveralls.io/github/data-structures-and-algorithms/skip-list';
22+
testlink.target = '_BLANK';
2523

26-
var searchBox = document.querySelector('.search-box');
27-
var input = document.querySelector('.search-input');
24+
const searchBox = document.querySelector('.search-box');
25+
const input = document.querySelector('.search-input');
2826

29-
// active search box when focus on searchBox.
30-
input.addEventListener('focus', function(){
27+
// Active search box when focus on searchBox.
28+
input.addEventListener('focus', function () {
3129
searchBox.classList.add('active');
3230
});
33-
3431
});

0 commit comments

Comments
 (0)