update URLs to 4cdn.org

This commit is contained in:
ccd0 2014-04-12 22:37:27 -07:00
parent 9acdd4bd85
commit 814b64b31c
4 changed files with 7 additions and 7 deletions

View File

@ -206,8 +206,8 @@ Gallery =
if g.DEAD or post.isDead or post.file.isDead if g.DEAD or post.isDead or post.file.isDead
return return
# XXX CORS for images.4chan.org WHEN? # XXX CORS for i.4cdn.org WHEN?
$.ajax "//api.4chan.org/#{post.board}/res/#{post.thread}.json", onload: -> $.ajax "//a.4cdn.org/#{post.board}/res/#{post.thread}.json", onload: ->
return if @status isnt 200 return if @status isnt 200
i = 0 i = 0
{posts} = @response {posts} = @response

View File

@ -35,7 +35,7 @@ Banner =
-> ->
type = Object.keys(types)[Math.floor 3 * Math.random()] type = Object.keys(types)[Math.floor 3 * Math.random()]
num = Math.floor types[type] * 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) -> click: (e) ->
if e.ctrlKey if e.ctrlKey
@ -86,4 +86,4 @@ Banner =
$.set string, cachedTest $.set string, cachedTest
$.set string2, cachedTest $.set string2, cachedTest
child child

View File

@ -23,7 +23,7 @@ ExpandComment =
return return
return unless a = $ '.abbr > a', post.nodes.comment return unless a = $ '.abbr > a', post.nodes.comment
a.textContent = "Post No.#{post} Loading..." 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) -> contract: (post) ->
return unless post.nodes.shortComment return unless post.nodes.shortComment
a = $ '.abbr > a', post.nodes.shortComment a = $ '.abbr > a', post.nodes.shortComment

View File

@ -22,7 +22,7 @@ InfiniScroll =
new Notice 'info', "Fetching next page.", 2 new Notice 'info', "Fetching next page.", 2
InfiniScroll.isFetching = true 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, $.ajax url, onloadend: InfiniScroll.cb.load,
whenModified: true whenModified: true
@ -136,4 +136,4 @@ InfiniScroll =
InfiniScroll.cache = new String @response InfiniScroll.cache = new String @response
InfiniScroll.cache.time = Date.now() InfiniScroll.cache.time = Date.now()
InfiniScroll.parse @response InfiniScroll.parse @response