Browse Source

fixed file:// urls on some webkit based systems

pull/776/head
Jonas Frost 10 years ago
parent
commit
27b5c38eb4
  1. 11
      js/push.js

11
js/push.js

@ -237,8 +237,9 @@
if (options._timeout) { if (options._timeout) {
clearTimeout(options._timeout); clearTimeout(options._timeout);
} }
if (xhr.readyState === 4) { if (xhr.readyState === 4) {
if (xhr.status === 200) { if (xhr.status === 200 || (isFileProtocol && xhr.status === 0)) {
success(xhr, options); success(xhr, options);
} else { } else {
failure(options.url); failure(options.url);
@ -265,14 +266,6 @@
xhr.send(); xhr.send();
if (isFileProtocol) {
if (xhr.status === 0 || xhr.status === 200) {
success(xhr, options);
} else {
failure(options.url);
}
}
if (xhr.readyState && !options.ignorePush) { if (xhr.readyState && !options.ignorePush) {
cachePush(); cachePush();
} }

Loading…
Cancel
Save