Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit 0fc560a

Browse files
committed
Whitespace/semicolon cleanups for JSHint
1 parent 65ae108 commit 0fc560a

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

enhance.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@
66

77
var doc = w.document,
88
docElem = doc.documentElement,
9-
head = doc.head || doc.getElementsByTagName( "head" )[ 0 ];
9+
head = doc.head || doc.getElementsByTagName( "head" )[ 0 ],
10+
ejs = {};
1011

1112
//ejs object for ejs-specific functions
12-
w.ejs = {};
13+
w.ejs = ejs;
1314

1415
// hasClass function - check if element has a class
1516
ejs.hasClass = function( elem, cls ){
16-
return elem.className.indexOf( cls ) > -1
17-
}
17+
return elem.className.indexOf( cls ) > -1;
18+
};
1819

1920
// Callback for running logic dependent on a property being defined
2021
// You can use isDefined to run code as soon as the document.body is defined, for example, for body-dependent scripts
2122
// or, for a script that's loaded asynchronously that depends on other scripts, such as jQuery.
2223
// First argument is the property that must be defined, second is the callback function
2324
ejs.onDefine = function( prop, callback ){
24-
var callbackStack = [];
25+
var callbackStack = [];
2526

2627
if( callback ){
2728
callbackStack.push( callback );
@@ -34,14 +35,14 @@
3435
}
3536
}
3637
else{
37-
setTimeout(checkRun, 15);
38+
setTimeout(checkRun, 15);
3839
}
39-
};
40+
}
4041

4142
checkRun();
4243
};
4344

44-
// shortcut of isDefine body-specific
45+
// shortcut of isDefine body-specific
4546
ejs.bodyReady = function( callback ){
4647
ejs.onDefine( "document.body", callback );
4748
};
@@ -79,7 +80,7 @@
7980
} else {
8081
head.appendChild( script );
8182
}
82-
};
83+
};
8384

8485
// Define base directory paths for referencing js, css, img files. Optional.
8586
ejs.basepath = {
@@ -88,17 +89,17 @@
8889
};
8990

9091
// Define arrays to contain JS and CSS files that are available
91-
ejs.files = {
92+
ejs.files = {
9293
js: {},
9394
css: {}
94-
};
95+
};
9596

9697
// Define arrays to contain JS and CSS files that will be loaded
9798
ejs.jsToLoad = [];
9899
ejs.cssToLoad = [];
99100

100-
// Function for adding files to the queue for loading.
101-
// CSS or JS is discovered by file path.
101+
// Function for adding files to the queue for loading.
102+
// CSS or JS is discovered by file path.
102103
// Files should not include base paths, if already defined in ejs.basepath.
103104
ejs.addFile = function( file ){
104105
var js = file.indexOf( ".js" ) > -1;
@@ -110,7 +111,7 @@
110111
return ( url.indexOf( ".js" ) > -1 ? ejs.loadJS : ejs.loadCSS )( url );
111112
};
112113

113-
// concatSyntax is a function that decorates a URL in whatever way necessary for a concatenator API.
114+
// concatSyntax is a function that decorates a URL in whatever way necessary for a concatenator API.
114115
// To configure, just define it as a function with a url argument, and return that url decorated any way your concatenator expects.
115116
// by default, Enhance uses the url pattern suggested in the QuickConcat project: https://github.com/filamentgroup/quickconcat
116117
ejs.concatSyntax = function( url ){

0 commit comments

Comments
 (0)