update URLs to 4cdn.org
This commit is contained in:
parent
9acdd4bd85
commit
814b64b31c
@ -206,8 +206,8 @@ Gallery =
|
||||
if g.DEAD or post.isDead or post.file.isDead
|
||||
return
|
||||
|
||||
# XXX CORS for images.4chan.org WHEN?
|
||||
$.ajax "//api.4chan.org/#{post.board}/res/#{post.thread}.json", onload: ->
|
||||
# XXX CORS for i.4cdn.org WHEN?
|
||||
$.ajax "//a.4cdn.org/#{post.board}/res/#{post.thread}.json", onload: ->
|
||||
return if @status isnt 200
|
||||
i = 0
|
||||
{posts} = @response
|
||||
|
||||
@ -35,7 +35,7 @@ Banner =
|
||||
->
|
||||
type = Object.keys(types)[Math.floor 3 * Math.random()]
|
||||
num = Math.floor types[type] * Math.random()
|
||||
@src = "//static.4chan.org/image/title/#{num}.#{type}"
|
||||
@src = "//s.4cdn.org/image/title/#{num}.#{type}"
|
||||
|
||||
click: (e) ->
|
||||
if e.ctrlKey
|
||||
@ -86,4 +86,4 @@ Banner =
|
||||
$.set string, cachedTest
|
||||
$.set string2, cachedTest
|
||||
|
||||
child
|
||||
child
|
||||
|
||||
@ -23,7 +23,7 @@ ExpandComment =
|
||||
return
|
||||
return unless a = $ '.abbr > a', post.nodes.comment
|
||||
a.textContent = "Post No.#{post} Loading..."
|
||||
$.cache "//api.4chan.org#{a.pathname}.json", -> ExpandComment.parse @, a, post
|
||||
$.cache "//a.4cdn.org#{a.pathname}.json", -> ExpandComment.parse @, a, post
|
||||
contract: (post) ->
|
||||
return unless post.nodes.shortComment
|
||||
a = $ '.abbr > a', post.nodes.shortComment
|
||||
|
||||
@ -22,7 +22,7 @@ InfiniScroll =
|
||||
new Notice 'info', "Fetching next page.", 2
|
||||
|
||||
InfiniScroll.isFetching = true
|
||||
url = "//api.4chan.org/#{g.BOARD}/catalog.json"
|
||||
url = "//a.4cdn.org/#{g.BOARD}/catalog.json"
|
||||
$.ajax url, onloadend: InfiniScroll.cb.load,
|
||||
whenModified: true
|
||||
|
||||
@ -136,4 +136,4 @@ InfiniScroll =
|
||||
|
||||
InfiniScroll.cache = new String @response
|
||||
InfiniScroll.cache.time = Date.now()
|
||||
InfiniScroll.parse @response
|
||||
InfiniScroll.parse @response
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user