Merge branch 'bstable'

Conflicts:
	LICENSE
	builds/4chan-X-beta.crx
	builds/4chan-X-beta.meta.js
	builds/4chan-X-beta.user.js
	builds/4chan-X-noupdate.crx
	builds/4chan-X-noupdate.user.js
	builds/4chan-X.crx
	builds/4chan-X.meta.js
	builds/4chan-X.user.js
	builds/4chan-X.zip
	builds/updates-beta.xml
	builds/updates.xml
	package.json
	src/General/Build.coffee
	src/General/Get.coffee
This commit is contained in:
ccd0 2015-02-11 23:58:04 -08:00
commit bb41c3a2ee
4 changed files with 8 additions and 7 deletions

View File

@ -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.x -->
### 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")]

View File

@ -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

View File

@ -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'

View File

@ -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