File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ <h2>Flickr Test</h2>
5555 // $('#DemoImages img').cacheImages({defaultImage: 'http://upload.wikimedia.org/wikipedia/commons/f/f8/Monocle_with_gallery.jpg'});
5656 $ ( function ( ) {
5757 // $('#flickrTest').cacheImages({debug: true});
58- $ ( document ) . on ( 'click' , '#dropCache' , function ( ) { cacheImagesDrop ( ) ; } ) ;
58+ $ ( document ) . on ( 'click' , '#dropCache' , function ( ) { $ . fn . cacheImages . drop ( ) ; } ) ;
5959 $ ( document ) . on ( 'click' , '#cacheLoadAll' , function ( ) { cacheImagesShowAll ( $ ( '#statWindow' ) ) ; } ) ;
6060 $ ( document ) . on ( 'click' , '#FlickrTest' , function ( ) {
6161 if ( $ ( '#FlickrTags' ) . val ( ) === '' ) {
@@ -73,7 +73,7 @@ <h2>Flickr Test</h2>
7373 var items = [ ] ;
7474
7575 $ . each ( data . items , function ( key , photo ) {
76- // cacheImagesFetchURL ( photo.media.m ); // Cache the image for later use
76+ // $.fn.cacheImages.fetchURL ( photo.media.m ); // Cache the image for later use
7777
7878 $ ( '#flickrTest' ) . append ( $ ( '<img />' ) . cacheImages ( { url : photo . media . m } ) ) ; // Using the caching immediately
7979 } ) ;
Original file line number Diff line number Diff line change 207207 /*
208208 * Manually cache an image into the local storage
209209 */
210- window . cacheImagesFetchURL = function ( url ) {
210+ $ . fn . cacheImages . fetchURL = function ( url ) {
211211 $ ( 'body' ) . append ( $ ( '<img style="display: none;" />' ) . addClass ( 'cacheImagesRemove' ) . cacheImages ( { url : url } ) ) ;
212212 } ;
213213 /*
214214 * Manually cache an image into the local storage
215215 */
216216 window . cacheImagesOutput = function ( url , storagePrefix ) {
217- if ( typeof storagePrefix === 'undefined' ) { storagePrefix = 'cached' ; }
217+ if ( typeof storagePrefix === 'undefined' ) { storagePrefix = $ . fn . cacheImages . defaults . storagePrefix ; }
218218 var tempKey = storagePrefix + ':' + url ;
219219 if ( window . localStorage . getItem ( tempKey ) != null ) {
220220 return window . localStorage . getItem ( tempKey ) ; // Image exists in the cache
235235 /*
236236 * Will remove all of the cached images from their localStorage
237237 */
238- window . cacheImagesDrop = function ( storagePrefix ) {
238+ $ . fn . cacheImages . drop = function ( storagePrefix ) {
239239 var dropKeys = [ ] , // Store the keys we need to drop here
240240 debug = false ;
241- if ( typeof storagePrefix === 'undefined' ) { storagePrefix = 'cached' ; }
241+ if ( typeof storagePrefix === 'undefined' ) { storagePrefix = $ . fn . cacheImages . defaults . storagePrefix ; }
242242
243243 // Lets get our loop on
244244 for ( i = 0 ; i < window . localStorage . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments