Don't check for 404 status headers on not Chrome browsers and at archivers.
This commit is contained in:
parent
078db94ee8
commit
ca7010de2f
@ -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);
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user