Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit e7d3510

Browse files
update the minified and cleanup some white space
1 parent bd859ec commit e7d3510

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

Diff for: .jshintrc

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@
1717
"strict": false,
1818
"trailing": true,
1919
"smarttabs": true,
20-
"globals": {"define": false}
20+
"supernew": false,
21+
"globals": {
22+
"define": false,
23+
"XDomainRequest": false,
24+
"ActiveXObject": false
25+
}
2126
}

Diff for: js/rem.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,16 @@
122122
try {
123123
var xhr = getXMLHttpRequest(),
124124
isOldIE = document.all;
125-
125+
126126
xhr.open( 'GET', url, true );
127127
xhr.send(null);
128-
128+
129129
// Better way for IE versions detection: http://tanalin.com/en/articles/ie-version-js/
130-
130+
131131
if ( !isOldIE || (isOldIE && window.XMLHttpRequest) ){ //If IE is greater than 6
132132
// This targets modern browsers and modern versions of IE,
133133
// which don't need the "new" keyword.
134-
xhr.onreadystatechange = function () {
134+
xhr.onreadystatechange = function() {
135135
if ( xhr.readyState === 4 ){
136136
callback(xhr, i);
137137
} // else { callback function on AJAX error }
@@ -214,41 +214,41 @@
214214
css = [], // initialize the array holding the parsed rules for use later
215215
fontSize = '';
216216

217-
// Notice: rem is a "root em" that means that in case when html element size was changed by css
218-
// or style we should not change document.documentElement.fontSize to 1em - only body size should be changed
217+
// Notice: rem is a "root em" that means that in case when html element size was changed by css
218+
// or style we should not change document.documentElement.fontSize to 1em - only body size should be changed
219219
// to 1em for calculation
220-
220+
221221
fontSize = (function () {
222222
var doc = document,
223223
docElement = doc.documentElement,
224224
body = doc.body || doc.createElement('body'),
225225
isFakeBody = !doc.body,
226-
div = doc.createElement('div'),
226+
div = doc.createElement('div'),
227227
currentSize = body.style.fontSize,
228228
size;
229-
229+
230230
if ( isFakeBody ) {
231231
docElement.appendChild( body );
232232
}
233-
234-
div.style.cssText = 'width:1em; position:absolute; visibility:hidden; padding: 0;';
235-
233+
234+
div.style.cssText = 'width:1em; position:absolute; visibility:hidden; padding: 0;';
235+
236236
body.style.fontSize = '1em';
237-
237+
238238
body.appendChild( div );
239239
size = div.offsetWidth;
240-
240+
241241
if ( isFakeBody ) {
242242
docElement.removeChild( body );
243243
}
244244
else {
245245
body.removeChild( div );
246-
body.style.fontSize = currentSize;
246+
body.style.fontSize = currentSize;
247247
}
248-
248+
249249
return size;
250250
}());
251-
251+
252252
processLinks();
253253
} // else { do nothing, you are awesome and have REM support }
254254

Diff for: js/rem.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)