diff --git a/src/General/Build.coffee b/src/General/Build.coffee index a39df478a..1fdf81afe 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -14,9 +14,6 @@ Build = "#{filename[...threshold - 5]}(...)#{ext}" else filename - thumbRotate: do -> - n = 0 - -> n = (n + 1) % 2 sameThread: (boardID, threadID) -> g.VIEW is 'thread' and g.BOARD.ID is boardID and g.THREADID is +threadID postURL: (boardID, threadID, postID) -> @@ -62,7 +59,7 @@ Build = width: data.w MD5: data.md5 size: data.fsize - turl: "//#{Build.thumbRotate()}.t.4cdn.org/#{boardID}/#{data.tim}s.jpg" + turl: "//i.4cdn.org/#{boardID}/#{data.tim}s.jpg" theight: data.tn_h twidth: data.tn_w isSpoiler: !!data.spoiler diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 13186d583..7215cf4e4 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -231,7 +231,7 @@ Get = width: data.media.media_w MD5: data.media.media_hash size: data.media.media_size - turl: data.media.thumb_link or "//t.4cdn.org/#{boardID}/#{data.media.preview_orig}" + turl: data.media.thumb_link or "//i.4cdn.org/#{boardID}/#{data.media.preview_orig}" theight: data.media.preview_h twidth: data.media.preview_w isSpoiler: data.media.spoiler is '1' diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 125bee370..745190c1c 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -14,7 +14,6 @@ class Post for el in $$ 'a[rel=canonical]', root2 el.removeAttribute 'rel' for el in $$ 'img[src]', root2 - el.src = el.src.replace /^(\w+:\/\/)[0-2](\.t\.4cdn\.org\/)/, '$10$2' el.src = el.src.replace /(spoiler-\w+)\d(\.png)$/, '$11$2' Fourchan.code.call nodes: comment: $ '.postMessage', root2 for el in $$ 'pre[style=""]', root2 @@ -175,7 +174,7 @@ class Post unit = ['B', 'KB', 'MB', 'GB'].indexOf @file.size.match(/\w+$/)[0] size *= 1024 while unit-- > 0 @file.sizeInBytes = size - @file.thumbURL = "#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" + @file.thumbURL = "#{location.protocol}//i.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" @file.isImage = /(jpg|png|gif)$/i.test @file.URL @file.isVideo = /webm$/i.test @file.URL nameNode = $ 'a', fileText