Apply Use Faster Image Host to intra-4chan image/webm links.
This commit is contained in:
parent
30a87b5057
commit
7a88b9f25d
@ -6,7 +6,11 @@ ImageHost =
|
||||
cb: @node
|
||||
|
||||
node: ->
|
||||
return unless @file and not @isClone and (m = @file.url.match /^https?:\/\/is\.4chan\.org\/(.*)$/)
|
||||
@file.link.hostname = 'i.4cdn.org'
|
||||
@file.thumbLink.hostname = 'i.4cdn.org' if @file.thumbLink
|
||||
@file.url = @file.link.href
|
||||
return if @isClone
|
||||
if @file and (m = @file.url.match /^https?:\/\/is\.4chan\.org\/(.*)$/)
|
||||
@file.link.hostname = 'i.4cdn.org'
|
||||
@file.thumbLink.hostname = 'i.4cdn.org' if @file.thumbLink
|
||||
@file.url = @file.link.href
|
||||
for link in $$ 'a[href^="http://is.4chan.org/"], a[href^="https://is.4chan.org/"]', @nodes.comment
|
||||
link.hostname = 'i.4cdn.org'
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user