dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Enable jscs rules 'requireSpacesInside*Brackets' and make pass
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.page
/
mediawiki.page.image.pagination.js
diff --git
a/resources/src/mediawiki.page/mediawiki.page.image.pagination.js
b/resources/src/mediawiki.page/mediawiki.page.image.pagination.js
index
7daf386
..
49a51df
100644
(file)
--- a/
resources/src/mediawiki.page/mediawiki.page.image.pagination.js
+++ b/
resources/src/mediawiki.page/mediawiki.page.image.pagination.js
@@
-19,11
+19,11
@@
jqXhr = undefined;
// Try the cache
jqXhr = undefined;
// Try the cache
- if ( cache[
url
] ) {
+ if ( cache[
url
] ) {
// Update access freshness
cacheOrder.splice( $.inArray( url, cacheOrder ), 1 );
cacheOrder.push( url );
// Update access freshness
cacheOrder.splice( $.inArray( url, cacheOrder ), 1 );
cacheOrder.push( url );
- return $.Deferred().resolve( cache[
url
] ).promise();
+ return $.Deferred().resolve( cache[
url
] ).promise();
}
// @todo Don't fetch the entire page. Ideally we'd only fetch the content portion or the data
}
// @todo Don't fetch the entire page. Ideally we'd only fetch the content portion or the data
@@
-37,12
+37,12
@@
jqXhr = undefined;
// Cache the newly loaded page
jqXhr = undefined;
// Cache the newly loaded page
- cache[
url
] = $contents;
+ cache[
url
] = $contents;
cacheOrder.push( url );
// Remove the oldest entry if we're over the limit
if ( cacheOrder.length > 10 ) {
cacheOrder.push( url );
// Remove the oldest entry if we're over the limit
if ( cacheOrder.length > 10 ) {
- delete cache[ cacheOrder[
0
] ];
+ delete cache[ cacheOrder[
0
] ];
cacheOrder = cacheOrder.slice( 1 );
}
} );
cacheOrder = cacheOrder.slice( 1 );
}
} );