diff options
author | Deathamns <deathamns@gmail.com> | 2014-11-04 12:32:44 +0100 |
---|---|---|
committer | Deathamns <deathamns@gmail.com> | 2014-11-09 17:41:02 +0100 |
commit | d98a8161f9ef23992b88aa1f8c6a17eae45e7959 (patch) | |
tree | e6ab346b0aa93f1cd784814dc6a245d2b7ba19e1 /src/js/assets.js | |
parent | ba0b11aabe810c6d0d29b9daf9741ec758272385 (diff) | |
download | uBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.zip uBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.tar.gz uBlock-d98a8161f9ef23992b88aa1f8c6a17eae45e7959.tar.bz2 |
Drop js-loader, updates from gorhill/uBlock/master
Diffstat (limited to 'src/js/assets.js')
-rw-r--r-- | src/js/assets.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/assets.js b/src/js/assets.js index 83b07e8..737dea6 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -229,7 +229,9 @@ var cachedAssetsManager = (function() { var getTextFileFromURL = function(url, onLoad, onError) { // https://github.com/gorhill/uMatrix/issues/15 var onResponseReceived = function() { - if ( typeof this.status === 'number' && this.status >= 200 && this.status < 300 ) { + // xhr for local files gives status 0, but actually succeeds + if ( this.status >= 200 && this.status < 300 + || this.status === 0 && this.responseText ) { return onLoad.call(this); } return onError.call(this); |