Skip to content

Commit 00a100a

Browse files
committed
Add timeout + prepare 1.1.0
1 parent b54cebd commit 00a100a

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
## master ##
44

5+
## 1.1.0 ##
6+
57
### NEW ###
68

79
* Add `withCredentials` option (#179 thanks oliver-schoendorn)
810
* Add `cordovaFilesystemRoot` option (#111 thanks tjwoon)
11+
* Add `timeout` option (#190 thanks gabrielstuff)
912

1013
### FIXED ###
1114

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Wrapper for Ionic Framework:
270270

271271
License
272272
-------
273-
Copyright 2012-2016 (c) Christophe BENOIT
273+
Copyright 2012-2017 (c) Christophe BENOIT
274274

275275
Apache License - see LICENSE.md
276276

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imgcache.js",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"homepage": "https://github.com/chrisben/imgcache.js",
55
"authors": [
66
{

js/imgcache.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*! imgcache.js
2-
Copyright 2012-2016 Christophe BENOIT
2+
Copyright 2012-2017 Christophe BENOIT
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
1818
/*global console,LocalFileSystem,device,FileTransfer,define,module*/
1919

2020
var ImgCache = {
21-
version: '1.0.0',
21+
version: '1.1.0',
2222
// options to override before using the library (but after loading this script!)
2323
options: {
2424
debug: false, /* call the log method ? */
@@ -30,7 +30,8 @@ var ImgCache = {
3030
headers: {}, /* HTTP headers for the download requests -- e.g: headers: { 'Accept': 'application/jpg' } */
3131
withCredentials: false, /* indicates whether or not cross-site Access-Control requests should be made using credentials */
3232
skipURIencoding: false, /* enable if URIs are already encoded (skips call to sanitizeURI) */
33-
cordovaFilesystemRoot: null /* if specified, use one of the Cordova File plugin's app directories for storage */
33+
cordovaFilesystemRoot: null, /* if specified, use one of the Cordova File plugin's app directories for storage */
34+
timeout: 0 /* timeout delay in ms for xhr request */
3435
},
3536
overridables: {
3637
hash: function (s) {
@@ -452,6 +453,7 @@ var ImgCache = {
452453
xhr.withCredentials = true;
453454
}
454455

456+
xhr.timeout = ImgCache.options.timeout
455457
xhr.responseType = 'blob';
456458
for (var key in headers) {
457459
xhr.setRequestHeader(key, headers[key]);

package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
summary: "JS library that stores images locally for offline apps using PhoneGap/Cordova or browsers supporting the new html5 File API",
3-
version: "1.0.0",
3+
version: "1.1.0",
44
git: "https://github.com/chrisben/imgcache.js"
55
});
66

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imgcache.js",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "JS library based on the File API to cache images for offline recovery (target: cordova/phonegap & chrome)",
55
"main": "js/imgcache.js",
66
"directories": {

0 commit comments

Comments
 (0)