Opera will always retry unless the thread died.

This commit is contained in:
Nicolas Stepien 2011-09-25 01:32:43 +02:00
parent fe45fcb4f0
commit d955ef0e0e
2 changed files with 15 additions and 8 deletions

View File

@ -2737,12 +2737,16 @@
var req, thumb;
thumb = this.previousSibling;
imgExpand.contract(thumb);
req = $.ajax(this.src, null, 'head');
return req.onreadystatechange = function(e) {
if (this.status !== 404) {
return setTimeout(imgExpand.retry, 10000, thumb);
}
};
if (navigator.appName !== 'Opera') {
req = $.ajax(this.src, null, 'head');
return req.onreadystatechange = function(e) {
if (this.status !== 404) {
return setTimeout(imgExpand.retry, 10000, thumb);
}
};
} else if (!g.dead) {
return setTimeout(imgExpand.retry, 10000, thumb);
}
},
retry: function(thumb) {
if (!thumb.hidden) {

View File

@ -2026,8 +2026,11 @@ imgExpand =
thumb = @previousSibling
imgExpand.contract thumb
#navigator.online is not x-browser/os yet
req = $.ajax @src, null, 'head'
req.onreadystatechange = (e) -> setTimeout imgExpand.retry, 10000, thumb if @status isnt 404
if navigator.appName isnt 'Opera'
req = $.ajax @src, null, 'head'
req.onreadystatechange = (e) -> setTimeout imgExpand.retry, 10000, thumb if @status isnt 404
else unless g.dead
setTimeout imgExpand.retry, 10000, thumb
retry: (thumb) ->
imgExpand.expand thumb unless thumb.hidden