@@ -190,9 +190,9 @@ License: MIT License (see homepage)
190
190
media = determineMedia ( __stylesheets [ s ] ) ;
191
191
createMediaContainers ( media ) ;
192
192
if ( __stylesheets [ s ] . href )
193
- {
194
- determinePath ( __stylesheets [ s ] ) ;
195
- }
193
+ {
194
+ determinePath ( __stylesheets [ s ] ) ;
195
+ }
196
196
}
197
197
getCSSFiles ( ) ;
198
198
}
@@ -497,26 +497,33 @@ License: MIT License (see homepage)
497
497
parent = stylesheet . parentStyleSheet ,
498
498
parent_path = EMPTY ,
499
499
prefix = EMPTY ,
500
- full_url = FALSE ,
501
- curr_path , path_last_slash , file_name ;
500
+ full_url = FALSE ,
501
+ curr_path , path_last_slash , file_name ;
502
502
if ( ! css_path )
503
- {
504
- css_path = NULL ;
505
- }
506
- else
507
- {
508
- full_url = css_path . match ( REGEXP_URL ) ;
509
- if ( is ( full_url , ARRAY ) )
510
- {
511
- full_url = ( full_url . length > 0 ) ;
512
- }
513
- }
514
- // we only want sheets
515
- if ( ! actual_path && // that don't already have a path
516
- ! full_url ) // that don't have a full URL
517
- {
518
- if ( css_path . indexOf ( SLASH ) === 0 ) { css_path = css_path . substring ( 1 ) ; }
519
- curr_path = LOCATION . substring ( 0 , LOCATION . lastIndexOf ( SLASH ) ) ;
503
+ {
504
+ css_path = NULL ;
505
+ }
506
+ else
507
+ {
508
+ full_url = css_path . match ( REGEXP_URL ) ;
509
+ if ( is ( full_url , ARRAY ) )
510
+ {
511
+ full_url = ( full_url . length > 0 ) ;
512
+ }
513
+ }
514
+ // we only want sheets
515
+ if ( ! actual_path && // that don't already have a path
516
+ ! full_url ) // that don't have a full URL
517
+ {
518
+ if ( css_path . indexOf ( SLASH ) === 0 )
519
+ {
520
+ css_path = css_path . substring ( 1 ) ;
521
+ curr_path = LOCATION . substring ( 0 , LOCATION . lastIndexOf ( WINDOW . location . pathname ) ) ;
522
+ }
523
+ else
524
+ {
525
+ curr_path = LOCATION . substring ( 0 , LOCATION . lastIndexOf ( SLASH ) ) ;
526
+ }
520
527
path_last_slash = css_path . lastIndexOf ( SLASH ) ;
521
528
file_name = css_path . substring ( path_last_slash + 1 ) ;
522
529
// check for an owner
@@ -1153,31 +1160,31 @@ License: MIT License (see homepage)
1153
1160
}
1154
1161
function camelize ( str )
1155
1162
{
1156
- var
1157
- regex = / ( - [ a - z ] ) / g,
1158
- func = function ( bit ) {
1159
- return bit . toUpperCase ( ) . replace ( HYPHEN , EMPTY ) ;
1160
- } ;
1161
- camelize = function ( str )
1162
- {
1163
- return is ( str , STRING ) ? low ( str ) . replace ( regex , func )
1164
- : str ;
1165
- } ;
1166
- return camelize ( str ) ;
1167
- }
1168
- function zero_out ( str )
1169
- {
1170
- /* finds and removes any unit on a zero
1171
- http://www.w3.org/TR/2006/WD-css3-values-20060919/#numbers0
1172
- Relative values: em, ex, px, gd, rem, vw, vh, vm, ch
1173
- Absolute values: in, cm, mm, pt, pc
1174
- Percentages: %
1175
- Angles: deg, grad, rad, turn
1176
- Times: ms, s
1177
- Frequencies: Hz, kHz */
1178
- var regex = / ( \s 0 ) ( ( c | m | r ? e | v ) m | c h | d e g | e x | g d | g ? r a d | i n | k ? H z | m ? s | p [ c t x ] | t u r n | v [ h w ] | % ) / g;
1179
- return is ( str , STRING ) ? str . replace ( regex , CAPTURE ) : str ;
1180
- }
1163
+ var
1164
+ regex = / ( - [ a - z ] ) / g,
1165
+ func = function ( bit ) {
1166
+ return bit . toUpperCase ( ) . replace ( HYPHEN , EMPTY ) ;
1167
+ } ;
1168
+ camelize = function ( str )
1169
+ {
1170
+ return is ( str , STRING ) ? low ( str ) . replace ( regex , func )
1171
+ : str ;
1172
+ } ;
1173
+ return camelize ( str ) ;
1174
+ }
1175
+ function zero_out ( str )
1176
+ {
1177
+ /* finds and removes any unit on a zero
1178
+ http://www.w3.org/TR/2006/WD-css3-values-20060919/#numbers0
1179
+ Relative values: em, ex, px, gd, rem, vw, vh, vm, ch
1180
+ Absolute values: in, cm, mm, pt, pc
1181
+ Percentages: %
1182
+ Angles: deg, grad, rad, turn
1183
+ Times: ms, s
1184
+ Frequencies: Hz, kHz */
1185
+ var regex = / ( \s 0 ) ( ( c | m | r ? e | v ) m | c h | d e g | e x | g d | g ? r a d | i n | k ? H z | m ? s | p [ c t x ] | t u r n | v [ h w ] | % ) / g;
1186
+ return is ( str , STRING ) ? str . replace ( regex , CAPTURE ) : str ;
1187
+ }
1181
1188
function addInlineStyle ( el , property , value )
1182
1189
{
1183
1190
try {
@@ -1207,30 +1214,30 @@ License: MIT License (see homepage)
1207
1214
function XHR ( )
1208
1215
{
1209
1216
var
1210
- obj ,
1211
- type = NULL ;
1217
+ obj ,
1218
+ type = NULL ;
1212
1219
if ( WINDOW . XMLHttpRequest )
1213
- {
1214
- obj = WINDOW . XMLHttpRequest ;
1215
- }
1216
- else
1217
- {
1220
+ {
1221
+ obj = WINDOW . XMLHttpRequest ;
1222
+ }
1223
+ else
1224
+ {
1218
1225
try {
1219
- obj = ActiveXObject ;
1220
- type = 'Microsoft.XMLHTTP' ;
1221
- connection = new obj ( type ) ;
1222
- }
1223
- catch ( e )
1224
- {
1225
- obj = function ( ) {
1226
- return NULL ;
1227
- } ;
1228
- }
1229
- }
1230
- XHR = function ( ) {
1231
- return new obj ( type ) ;
1232
- } ;
1233
- return XHR ( ) ;
1226
+ obj = ActiveXObject ;
1227
+ type = 'Microsoft.XMLHTTP' ;
1228
+ connection = new obj ( type ) ;
1229
+ }
1230
+ catch ( e )
1231
+ {
1232
+ obj = function ( ) {
1233
+ return NULL ;
1234
+ } ;
1235
+ }
1236
+ }
1237
+ XHR = function ( ) {
1238
+ return new obj ( type ) ;
1239
+ } ;
1240
+ return XHR ( ) ;
1234
1241
}
1235
1242
function getCSSFiles ( )
1236
1243
{
@@ -1347,7 +1354,7 @@ License: MIT License (see homepage)
1347
1354
{
1348
1355
key = __cache_object . key ( i ) ;
1349
1356
if ( key &&
1350
- key . indexOf ( ECSSTENDER ) === 0 )
1357
+ key . indexOf ( ECSSTENDER ) === 0 )
1351
1358
{
1352
1359
delete ( __cache_object [ key ] ) ;
1353
1360
}
@@ -1527,25 +1534,25 @@ License: MIT License (see homepage)
1527
1534
c1 = str . charCodeAt ( i ) ;
1528
1535
if ( c1 < 128 )
1529
1536
{
1530
- newstr += charAt ( c1 ) ;
1531
- }
1532
- else if ( ( c1 > 127 ) && ( c1 < 2048 ) )
1533
- {
1534
- newstr += charAt ( ( c1 >> 6 ) | 192 ) ;
1535
- newstr += charAt ( ( c1 & 63 ) | 128 ) ;
1536
- }
1537
- else
1538
- {
1539
- newstr += charAt ( ( c1 >> 12 ) | 224 ) ;
1540
- newstr += charAt ( ( ( c1 >> 6 ) & 63 ) | 128 ) ;
1541
- newstr += charAt ( ( c1 & 63 ) | 128 ) ;
1542
- }
1543
- }
1544
- str = newstr ;
1545
- newstr = EMPTY ;
1546
- // base64
1547
- i = 0 ;
1548
- iLen = str . length ;
1537
+ newstr += charAt ( c1 ) ;
1538
+ }
1539
+ else if ( ( c1 > 127 ) && ( c1 < 2048 ) )
1540
+ {
1541
+ newstr += charAt ( ( c1 >> 6 ) | 192 ) ;
1542
+ newstr += charAt ( ( c1 & 63 ) | 128 ) ;
1543
+ }
1544
+ else
1545
+ {
1546
+ newstr += charAt ( ( c1 >> 12 ) | 224 ) ;
1547
+ newstr += charAt ( ( ( c1 >> 6 ) & 63 ) | 128 ) ;
1548
+ newstr += charAt ( ( c1 & 63 ) | 128 ) ;
1549
+ }
1550
+ }
1551
+ str = newstr ;
1552
+ newstr = EMPTY ;
1553
+ // base64
1554
+ i = 0 ;
1555
+ iLen = str . length ;
1549
1556
while ( i < iLen )
1550
1557
{
1551
1558
c1 = str . charCodeAt ( i ++ ) ;
@@ -1559,11 +1566,11 @@ License: MIT License (see homepage)
1559
1566
1560
1567
if ( isNaN ( c2 ) )
1561
1568
{
1562
- e3 = e4 = 64 ;
1569
+ e3 = e4 = 64 ;
1563
1570
}
1564
1571
else if ( isNaN ( c3 ) )
1565
1572
{
1566
- e4 = 64 ;
1573
+ e4 = 64 ;
1567
1574
}
1568
1575
newstr += keystr . charAt ( e1 ) + keystr . charAt ( e2 ) +
1569
1576
keystr . charAt ( e3 ) + keystr . charAt ( e4 ) ;
@@ -2084,36 +2091,36 @@ License: MIT License (see homepage)
2084
2091
{
2085
2092
// test element
2086
2093
el = newElement ( DIV ) ;
2087
- // are property and value flowing in separately?
2088
- if ( value )
2089
- {
2090
- property = what ;
2091
- value = arrayify ( value ) ;
2092
- }
2093
- else
2094
- {
2095
- what = what . split ( REGEXP_P_V ) ;
2096
- property = what [ 0 ] ;
2097
- value = [ trim ( what [ 1 ] ) ] ;
2098
- // reset what for the cache
2099
- what = arg [ 1 ] ;
2100
- }
2101
- // camel case
2102
- property = camelize ( property ) ;
2103
- if ( el . style [ property ] !== UNDEFINED )
2104
- {
2105
- // set it
2106
- el . style [ property ] = value [ 0 ] ;
2107
- // get it back
2108
- val = zero_out ( el . style [ property ] ) ;
2109
- // test
2110
- i = value . length ;
2111
- while ( i -- &&
2112
- ! result )
2113
- {
2114
- result = ( val === value [ i ] ) ;
2115
- }
2116
- }
2094
+ // are property and value flowing in separately?
2095
+ if ( value )
2096
+ {
2097
+ property = what ;
2098
+ value = arrayify ( value ) ;
2099
+ }
2100
+ else
2101
+ {
2102
+ what = what . split ( REGEXP_P_V ) ;
2103
+ property = what [ 0 ] ;
2104
+ value = [ trim ( what [ 1 ] ) ] ;
2105
+ // reset what for the cache
2106
+ what = arg [ 1 ] ;
2107
+ }
2108
+ // camel case
2109
+ property = camelize ( property ) ;
2110
+ if ( el . style [ property ] !== UNDEFINED )
2111
+ {
2112
+ // set it
2113
+ el . style [ property ] = value [ 0 ] ;
2114
+ // get it back
2115
+ val = zero_out ( el . style [ property ] ) ;
2116
+ // test
2117
+ i = value . length ;
2118
+ while ( i -- &&
2119
+ ! result )
2120
+ {
2121
+ result = ( val === value [ i ] ) ;
2122
+ }
2123
+ }
2117
2124
}
2118
2125
// selector test
2119
2126
else if ( type == SELECTOR )
@@ -2386,8 +2393,8 @@ License: MIT License (see homepage)
2386
2393
re = re || makeClassRegExp ( the_class ) ;
2387
2394
if ( hasClass ( el , the_class , re ) )
2388
2395
{
2389
- el . className = trim ( el . className . replace ( re , SPACE ) ) ;
2390
- }
2396
+ el . className = trim ( el . className . replace ( re , SPACE ) ) ;
2397
+ }
2391
2398
} ;
2392
2399
eCSStender . removeClass = removeClass ;
2393
2400
/**
@@ -2437,44 +2444,44 @@ License: MIT License (see homepage)
2437
2444
doScroll = DOCUMENT . documentElement . doScroll ;
2438
2445
2439
2446
// for Mozilla/Safari/Opera9
2440
- if ( DOCUMENT . addEventListener )
2447
+ if ( DOCUMENT . addEventListener )
2441
2448
{
2442
2449
DOCUMENT . addEventListener ( DCL , function ( ) {
2443
2450
DOCUMENT . removeEventListener ( DCL , arguments . callee , FALSE ) ;
2444
2451
initialize ( ) ;
2445
2452
} , FALSE ) ;
2446
2453
}
2447
2454
// If IE event model is used
2448
- else if ( DOCUMENT . attachEvent )
2449
- {
2450
- // ensure firing before onload, maybe late but safe also for iframes
2451
- DOCUMENT . attachEvent ( ORC , function ( ) {
2452
- if ( DOCUMENT . readyState === COMPLETE ) {
2453
- DOCUMENT . detachEvent ( ORC , arguments . callee ) ;
2454
- initialize ( ) ;
2455
- }
2456
- } ) ;
2455
+ else if ( DOCUMENT . attachEvent )
2456
+ {
2457
+ // ensure firing before onload, maybe late but safe also for iframes
2458
+ DOCUMENT . attachEvent ( ORC , function ( ) {
2459
+ if ( DOCUMENT . readyState === COMPLETE ) {
2460
+ DOCUMENT . detachEvent ( ORC , arguments . callee ) ;
2461
+ initialize ( ) ;
2462
+ }
2463
+ } ) ;
2457
2464
2458
- // If IE and not an iframe, continually check to see if the document is ready
2459
- if ( doScroll &&
2460
- WINDOW == WINDOW . top )
2461
- {
2462
- ( function ( ) {
2463
- try {
2464
- // If IE is used, use the trick by Diego Perini
2465
- // http://javascript.nwbox.com/IEContentLoaded/
2466
- doScroll ( 'left' ) ;
2467
- }
2468
- catch ( error )
2469
- {
2470
- setTimeout ( arguments . callee , 0 ) ;
2471
- return ;
2472
- }
2465
+ // If IE and not an iframe, continually check to see if the document is ready
2466
+ if ( doScroll &&
2467
+ WINDOW == WINDOW . top )
2468
+ {
2469
+ ( function ( ) {
2470
+ try {
2471
+ // If IE is used, use the trick by Diego Perini
2472
+ // http://javascript.nwbox.com/IEContentLoaded/
2473
+ doScroll ( 'left' ) ;
2474
+ }
2475
+ catch ( error )
2476
+ {
2477
+ setTimeout ( arguments . callee , 0 ) ;
2478
+ return ;
2479
+ }
2473
2480
// and execute any waiting functions
2474
- initialize ( ) ;
2475
- } ) ( ) ;
2476
- }
2477
- }
2481
+ initialize ( ) ;
2482
+ } ) ( ) ;
2483
+ }
2484
+ }
2478
2485
} ) ( ) ;
2479
2486
2480
2487
} ) ( ) ;
0 commit comments