Close #567
This commit is contained in:
parent
e29c806268
commit
39ccd42729
@ -4160,10 +4160,13 @@
|
|||||||
}
|
}
|
||||||
url = "//images.4chan.org/" + src[3] + "/src/" + src[5] + "?" + (Date.now());
|
url = "//images.4chan.org/" + src[3] + "/src/" + src[5] + "?" + (Date.now());
|
||||||
}
|
}
|
||||||
|
if ($.engine !== 'webkit' && url.split('/')[2] === 'images.4chan.org') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
timeoutID = setTimeout((function() {
|
timeoutID = setTimeout((function() {
|
||||||
return _this.src = url;
|
return _this.src = url;
|
||||||
}), 3000);
|
}), 3000);
|
||||||
if (!($.engine === 'webkit' && src[2] === 'images.4chan.org')) {
|
if ($.engine !== 'webkit' || url.split('/')[2] !== 'images.4chan.org') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.ajax(url, {
|
return $.ajax(url, {
|
||||||
@ -4345,8 +4348,11 @@
|
|||||||
}
|
}
|
||||||
url = "//images.4chan.org/" + src[3] + "/src/" + src[5] + "?" + (Date.now());
|
url = "//images.4chan.org/" + src[3] + "/src/" + src[5] + "?" + (Date.now());
|
||||||
}
|
}
|
||||||
|
if ($.engine !== 'webkit' && url.split('/')[2] === 'images.4chan.org') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
timeoutID = setTimeout(ImageExpand.expand, 10000, thumb, url);
|
timeoutID = setTimeout(ImageExpand.expand, 10000, thumb, url);
|
||||||
if (!($.engine === 'webkit' && url.split('/')[2] === 'images.4chan.org')) {
|
if ($.engine !== 'webkit' || url.split('/')[2] !== 'images.4chan.org') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return $.ajax(url, {
|
return $.ajax(url, {
|
||||||
|
|||||||
@ -3228,14 +3228,13 @@ ImageHover =
|
|||||||
src = @src.replace(/\?\d+$/, '').split '/'
|
src = @src.replace(/\?\d+$/, '').split '/'
|
||||||
unless src[2] is 'images.4chan.org' and url = Redirect.image src[3], src[5]
|
unless src[2] is 'images.4chan.org' and url = Redirect.image src[3], src[5]
|
||||||
return if g.dead
|
return if g.dead
|
||||||
# CloudFlare may cache banned pages instead of images.
|
|
||||||
# This will fool CloudFlare's cache.
|
# This will fool CloudFlare's cache.
|
||||||
url = "//images.4chan.org/#{src[3]}/src/#{src[5]}?#{Date.now()}"
|
url = "//images.4chan.org/#{src[3]}/src/#{src[5]}?#{Date.now()}"
|
||||||
# navigator.online is not x-browser/os yet
|
return if $.engine isnt 'webkit' and url.split('/')[2] is 'images.4chan.org'
|
||||||
timeoutID = setTimeout (=> @src = url), 3000
|
timeoutID = setTimeout (=> @src = url), 3000
|
||||||
# Only Chrome let userscript break through cross domain requests.
|
# Only Chrome let userscripts do cross domain requests.
|
||||||
# Don't check it 404s in the archivers.
|
# Don't check for 404'd status in the archivers.
|
||||||
return unless $.engine is 'webkit' and src[2] is 'images.4chan.org'
|
return if $.engine isnt 'webkit' or url.split('/')[2] isnt 'images.4chan.org'
|
||||||
$.ajax url, onreadystatechange: (-> clearTimeout timeoutID if @status is 404),
|
$.ajax url, onreadystatechange: (-> clearTimeout timeoutID if @status is 404),
|
||||||
type: 'head'
|
type: 'head'
|
||||||
mouseout: ->
|
mouseout: ->
|
||||||
@ -3349,14 +3348,13 @@ ImageExpand =
|
|||||||
src = @src.replace(/\?\d+$/, '').split '/'
|
src = @src.replace(/\?\d+$/, '').split '/'
|
||||||
unless src[2] is 'images.4chan.org' and url = Redirect.image src[3], src[5]
|
unless src[2] is 'images.4chan.org' and url = Redirect.image src[3], src[5]
|
||||||
return if g.dead
|
return if g.dead
|
||||||
# CloudFlare may cache banned pages instead of images.
|
|
||||||
# This will fool CloudFlare's cache.
|
# This will fool CloudFlare's cache.
|
||||||
url = "//images.4chan.org/#{src[3]}/src/#{src[5]}?#{Date.now()}"
|
url = "//images.4chan.org/#{src[3]}/src/#{src[5]}?#{Date.now()}"
|
||||||
#navigator.online is not x-browser/os yet
|
return if $.engine isnt 'webkit' and url.split('/')[2] is 'images.4chan.org'
|
||||||
timeoutID = setTimeout ImageExpand.expand, 10000, thumb, url
|
timeoutID = setTimeout ImageExpand.expand, 10000, thumb, url
|
||||||
# Only Chrome let userscript break through cross domain requests.
|
# Only Chrome let userscripts do cross domain requests.
|
||||||
# Don't check it 404s in the archivers.
|
# Don't check for 404'd status in the archivers.
|
||||||
return unless $.engine is 'webkit' and url.split('/')[2] is 'images.4chan.org'
|
return if $.engine isnt 'webkit' or url.split('/')[2] isnt 'images.4chan.org'
|
||||||
$.ajax url, onreadystatechange: (-> clearTimeout timeoutID if @status is 404),
|
$.ajax url, onreadystatechange: (-> clearTimeout timeoutID if @status is 404),
|
||||||
type: 'head'
|
type: 'head'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user