Drop support for is.4chan.org in posts generated from JSON for now.
This commit is contained in:
parent
464894af56
commit
556feabfa9
@ -26,6 +26,8 @@ Build.Test =
|
||||
href = el.href
|
||||
href = href.replace /(^\w+:\/\/boards.4chan.org\/[^\/]+\/thread\/\d+)\/.*/, '$1'
|
||||
el.setAttribute 'href', href
|
||||
for el in $$ '.fileText > a, a.fileThumb', root2 when el.hostname is 'is.4chan.org'
|
||||
el.hostname = 'i.4cdn.org'
|
||||
for el in $$ 'img[src]', root2
|
||||
el.src = el.src.replace /(spoiler-\w+)\d(\.png)$/, '$11$2'
|
||||
for el in $$ 'pre.prettyprinted', root2
|
||||
|
||||
@ -66,7 +66,7 @@ Build =
|
||||
url: if boardID is 'f'
|
||||
"#{location.protocol}//i.4cdn.org/#{boardID}/#{encodeURIComponent data.filename}#{data.ext}"
|
||||
else
|
||||
"#{location.protocol}//#{if data.no % 3 then 'i.4cdn.org' else 'is.4chan.org'}/#{boardID}/#{data.tim}#{data.ext}"
|
||||
"#{location.protocol}//i.4cdn.org/#{boardID}/#{data.tim}#{data.ext}"
|
||||
height: data.h
|
||||
width: data.w
|
||||
MD5: data.md5
|
||||
|
||||
@ -178,7 +178,7 @@ class Fetcher
|
||||
if @boardID is 'f'
|
||||
"#{location.protocol}//i.4cdn.org/#{@boardID}/#{encodeURIComponent data.media.media_filename}"
|
||||
else
|
||||
"#{location.protocol}//#{if data.no % 3 then 'i.4cdn.org' else 'is.4chan.org'}/#{@boardID}/#{encodeURIComponent data.media.media_orig}"
|
||||
"#{location.protocol}//i.4cdn.org/#{@boardID}/#{encodeURIComponent data.media.media_orig}"
|
||||
height: data.media.media_h
|
||||
width: data.media.media_w
|
||||
MD5: data.media.media_hash
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user