diff --git a/CHANGELOG.md b/CHANGELOG.md index ca682a6fe..9978c0c98 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,11 @@ The links to individual versions below are to copies of the script with the upda - (Zixaphir, ccd0) Various other minor changes and bugfixes. +### v1.9.23.10 +*2015-02-11* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.10/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.10/builds/4chan-X-noupdate.crx "Chromium version")] + +- 4chan has moved thumbnails to i.4cdn.org. + ### v1.9.23.9 *2015-02-08* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.9/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/src/General/Build.coffee b/src/General/Build.coffee index ad60b2e53..01e2f92f6 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -13,9 +13,6 @@ Build = "#{filename[...threshold - 5]}(...)#{ext}" else filename - thumbRotate: do -> - t = 0 - -> t = (if t then 0 else 1) sameThread: (boardID, threadID) -> g.VIEW is 'thread' and g.BOARD.ID is boardID and g.THREADID is +threadID postURL: (boardID, threadID, postID) -> @@ -61,7 +58,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/lib/fetcher.class b/src/General/lib/fetcher.class index e55cc6a11..5a498720a 100644 --- a/src/General/lib/fetcher.class +++ b/src/General/lib/fetcher.class @@ -160,7 +160,7 @@ class Fetcher 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 e9146754d..a32eeeda4 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 @@ -179,7 +178,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