Don't check for 404 status headers on not Chrome browsers and at archivers.

This commit is contained in:
Nicolas Stepien 2012-01-30 21:06:34 +01:00
parent 078db94ee8
commit ca7010de2f
2 changed files with 6 additions and 0 deletions

View File

@ -3319,6 +3319,9 @@
url = href + '?' + Date.now();
}
timeoutID = setTimeout(imgExpand.expand, 10000, thumb, url);
if (!(engine === 'webkit' && url.split('/')[2] === 'image.4chan.org')) {
return;
}
return $.ajax(url, {
onreadystatechange: (function() {
if (this.status === 404) return clearTimeout(timeoutID);

View File

@ -2548,6 +2548,9 @@ imgExpand =
url = href + '?' + Date.now()
#navigator.online is not x-browser/os yet
timeoutID = setTimeout imgExpand.expand, 10000, thumb, url
# Only Chrome let userscript break through cross domain requests.
# Don't check it 404s in the archivers.
return unless engine is 'webkit' and url.split('/')[2] is 'image.4chan.org'
$.ajax url, onreadystatechange: (-> clearTimeout timeoutID if @status is 404),
type: 'head'