Merge branch 'bstable'

Conflicts:
	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
This commit is contained in:
ccd0 2015-07-07 01:48:31 -07:00
commit 5dff6f211d
3 changed files with 18 additions and 3 deletions

View File

@ -17,6 +17,9 @@ The links to individual versions below are to copies of the script with the upda
### v1.11.2
**v1.11.2.5** *(2015-07-07)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.5/builds/4chan-X-noupdate.crx "Chromium version")]
- Add fireden.net archive.
**v1.11.2.4** *(2015-07-03)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.2.4/builds/4chan-X-noupdate.crx "Chromium version")]
- Minor bugfixes.

View File

@ -79,4 +79,13 @@
"software": "foolfuuka",
"boards": ["mlp", "qa"],
"files": ["mlp", "qa"]
}, {
"uid": 24,
"name": "fireden.net",
"domain": "boards.fireden.net",
"http": false,
"https": true,
"software": "foolfuuka",
"boards": ["cm", "ic", "vg", "y"],
"files": ["cm", "ic", "vg", "y"]
}]

View File

@ -81,7 +81,7 @@ class Fetcher
return false unless url = Redirect.to 'post', {@boardID, @postID}
if /^https:\/\//.test(url) or location.protocol is 'http:'
$.cache url,
do (self = @) -> -> self.parseArchivedPost @response
do (self = @) -> -> self.parseArchivedPost @response, url
,
responseType: 'json'
withCredentials: url.archive.withCredentials
@ -93,11 +93,11 @@ class Fetcher
# Image/thumbnail URLs loaded over HTTP can be modified in transit.
# Require them to be from a known HTTP host so that no referrer is sent to them from an HTTPS page.
delete media[key] unless media[key]? and media[key].match(/^(http:\/\/[^\/]+\/)?/)[0] in url.archive.imagehosts
@parseArchivedPost response
@parseArchivedPost response, url
return true
return false
parseArchivedPost: (data) ->
parseArchivedPost: (data, url) ->
# In case of multiple callbacks for the same request,
# don't parse the same original post more than once.
if post = g.posts["#{@boardID}.#{@postID}"]
@ -147,6 +147,9 @@ class Fetcher
commentHTML: comment
delete o.info.uniqueID if o.info.capcode
if data.media?.media_filename
# Fix URLs missing origin
for key, val of data.media when /_link$/.test(key) and val?[0] is '/'
data.media[key] = url.split('/', 3).join('/') + val
o.file =
name: data.media.media_filename
url: data.media.media_link or data.media.remote_media_link or