Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3

Conflicts:
	CHANGELOG.md
	package.json
	src/Archive/Redirect.coffee
This commit is contained in:
Zixaphir 2013-09-24 14:33:21 -07:00
commit 5b87c17e69
4 changed files with 24 additions and 34 deletions

View File

@ -1,5 +1,5 @@
/* /*
* 4chan X - Version 1.2.39 - 2013-09-20 * 4chan X - Version 1.2.39 - 2013-09-24
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE

View File

@ -22,7 +22,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* 4chan X - Version 1.2.39 - 2013-09-20 * 4chan X - Version 1.2.39 - 2013-09-24
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -9038,6 +9038,7 @@
'4plebs': { '4plebs': {
domain: 'archive.4plebs.org', domain: 'archive.4plebs.org',
http: true, http: true,
https: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['hr', 'tg', 'tv', 'x'], boards: ['hr', 'tg', 'tv', 'x'],
files: ['hr', 'tg', 'tv', 'x'] files: ['hr', 'tg', 'tv', 'x']
@ -9045,10 +9046,10 @@
'fap archive': { 'fap archive': {
domain: 'fuuka.worldathleticproject.org', domain: 'fuuka.worldathleticproject.org',
http: true, http: true,
https: false, https: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'], boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'],
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u'] files: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
}, },
'Foolz': { 'Foolz': {
domain: 'archive.foolz.us', domain: 'archive.foolz.us',
@ -9072,8 +9073,8 @@
https: true, https: true,
withCredentials: true, withCredentials: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
}, },
'Heinessen': { 'Heinessen': {
domain: 'archive.heinessen.com', domain: 'archive.heinessen.com',
@ -9163,14 +9164,10 @@
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
}, },
post: function(archive, _arg) { post: function(archive, _arg) {
var URL, boardID, postID, protocol; var URL, boardID, postID;
boardID = _arg.boardID, postID = _arg.postID; boardID = _arg.boardID, postID = _arg.postID;
protocol = Redirect.protocol(archive); URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
if (['Foolz', 'NSFW Foolz'].contains(archive.name)) {
protocol = 'https://';
}
URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
URL.archive = archive; URL.archive = archive;
return URL; return URL;
}, },

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript // Generated by CoffeeScript
/* /*
* 4chan X - Version 1.2.39 - 2013-09-20 * 4chan X - Version 1.2.39 - 2013-09-24
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -9031,6 +9031,7 @@
'4plebs': { '4plebs': {
domain: 'archive.4plebs.org', domain: 'archive.4plebs.org',
http: true, http: true,
https: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['hr', 'tg', 'tv', 'x'], boards: ['hr', 'tg', 'tv', 'x'],
files: ['hr', 'tg', 'tv', 'x'] files: ['hr', 'tg', 'tv', 'x']
@ -9038,10 +9039,10 @@
'fap archive': { 'fap archive': {
domain: 'fuuka.worldathleticproject.org', domain: 'fuuka.worldathleticproject.org',
http: true, http: true,
https: false, https: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'], boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'],
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u'] files: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
}, },
'Foolz': { 'Foolz': {
domain: 'archive.foolz.us', domain: 'archive.foolz.us',
@ -9065,8 +9066,8 @@
https: true, https: true,
withCredentials: true, withCredentials: true,
software: 'foolfuuka', software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
}, },
'Heinessen': { 'Heinessen': {
domain: 'archive.heinessen.com', domain: 'archive.heinessen.com',
@ -9156,14 +9157,10 @@
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
}, },
post: function(archive, _arg) { post: function(archive, _arg) {
var URL, boardID, postID, protocol; var URL, boardID, postID;
boardID = _arg.boardID, postID = _arg.postID; boardID = _arg.boardID, postID = _arg.postID;
protocol = Redirect.protocol(archive); URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
if (['Foolz', 'NSFW Foolz'].contains(archive.name)) {
protocol = 'https://';
}
URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID);
URL.archive = archive; URL.archive = archive;
return URL; return URL;
}, },

View File

@ -25,6 +25,7 @@ Redirect =
'4plebs': '4plebs':
domain: 'archive.4plebs.org' domain: 'archive.4plebs.org'
http: true http: true
https: true
software: 'foolfuuka' software: 'foolfuuka'
boards: ['hr', 'tg', 'tv', 'x'] boards: ['hr', 'tg', 'tv', 'x']
files: ['hr', 'tg', 'tv', 'x'] files: ['hr', 'tg', 'tv', 'x']
@ -32,10 +33,10 @@ Redirect =
'fap archive': 'fap archive':
domain: 'fuuka.worldathleticproject.org' domain: 'fuuka.worldathleticproject.org'
http: true http: true
https: false https: true
software: 'foolfuuka' software: 'foolfuuka'
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'] boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u'] files: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
'Foolz': 'Foolz':
domain: 'archive.foolz.us' domain: 'archive.foolz.us'
@ -59,8 +60,8 @@ Redirect =
https: true https: true
withCredentials: true withCredentials: true
software: 'foolfuuka' software: 'foolfuuka'
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
'Heinessen': 'Heinessen':
domain: 'archive.heinessen.com' domain: 'archive.heinessen.com'
@ -146,12 +147,7 @@ Redirect =
post: (archive, {boardID, postID}) -> post: (archive, {boardID, postID}) ->
# For fuuka-based archives: # For fuuka-based archives:
# https://github.com/eksopl/fuuka/issues/27 # https://github.com/eksopl/fuuka/issues/27
protocol = Redirect.protocol archive URL = new String "#{Redirect.protocol archive}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}"
# XXX foolz had HSTS set for 120 days, which broke XHR+CORS+Redirection when on HTTP.
# Remove necessary HTTPS procotol in September 2013.
if ['Foolz', 'NSFW Foolz'].contains archive.name
protocol = 'https://'
URL = new String "#{protocol}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}"
URL.archive = archive URL.archive = archive
URL URL