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
|
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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user