diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 1436a680a..c76382236 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -66,7 +66,7 @@ Build = url: if boardID is 'f' "#{location.protocol}//i.4cdn.org/#{boardID}/#{encodeURIComponent data.filename}#{data.ext}" else - "#{location.protocol}//i.4cdn.org/#{boardID}/#{data.tim}#{data.ext}" + "#{location.protocol}//#{if data.no % 3 then 'i.4cdn.org' else 'is.4chan.org'}/#{boardID}/#{data.tim}#{data.ext}" height: data.h width: data.w MD5: data.md5 diff --git a/src/classes/Fetcher.coffee b/src/classes/Fetcher.coffee index 7f41b0534..05569b41a 100644 --- a/src/classes/Fetcher.coffee +++ b/src/classes/Fetcher.coffee @@ -175,7 +175,10 @@ class Fetcher o.file = name: data.media.media_filename url: data.media.media_link or data.media.remote_media_link or - "#{location.protocol}//i.4cdn.org/#{@boardID}/#{encodeURIComponent data.media[if @boardID is 'f' then 'media_filename' else 'media_orig']}" + 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}" height: data.media.media_h width: data.media.media_w MD5: data.media.media_hash