diff --git a/LICENSE b/LICENSE index 2422c7a97..f86c6c33f 100755 --- a/LICENSE +++ b/LICENSE @@ -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. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f1715c195..661852bc8 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.39 - 2013-09-20 +* 4chan X - Version 1.2.39 - 2013-09-24 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -9038,6 +9038,7 @@ '4plebs': { domain: 'archive.4plebs.org', http: true, + https: true, software: 'foolfuuka', boards: ['hr', 'tg', 'tv', 'x'], files: ['hr', 'tg', 'tv', 'x'] @@ -9045,10 +9046,10 @@ 'fap archive': { domain: 'fuuka.worldathleticproject.org', http: true, - https: false, + https: true, software: 'foolfuuka', 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': { domain: 'archive.foolz.us', @@ -9072,8 +9073,8 @@ https: true, withCredentials: true, software: 'foolfuuka', - boards: ['a', 'co', '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'] + boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], + files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] }, 'Heinessen': { domain: 'archive.heinessen.com', @@ -9163,14 +9164,10 @@ return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; }, post: function(archive, _arg) { - var URL, boardID, postID, protocol; + var URL, boardID, postID; boardID = _arg.boardID, postID = _arg.postID; - protocol = Redirect.protocol(archive); - if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { - protocol = 'https://'; - } - URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); + URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); URL.archive = archive; return URL; }, diff --git a/builds/crx/script.js b/builds/crx/script.js index 141e5a56c..16abae8d4 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // 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. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -9031,6 +9031,7 @@ '4plebs': { domain: 'archive.4plebs.org', http: true, + https: true, software: 'foolfuuka', boards: ['hr', 'tg', 'tv', 'x'], files: ['hr', 'tg', 'tv', 'x'] @@ -9038,10 +9039,10 @@ 'fap archive': { domain: 'fuuka.worldathleticproject.org', http: true, - https: false, + https: true, software: 'foolfuuka', 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': { domain: 'archive.foolz.us', @@ -9065,8 +9066,8 @@ https: true, withCredentials: true, software: 'foolfuuka', - boards: ['a', 'co', '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'] + boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], + files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] }, 'Heinessen': { domain: 'archive.heinessen.com', @@ -9156,14 +9157,10 @@ return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; }, post: function(archive, _arg) { - var URL, boardID, postID, protocol; + var URL, boardID, postID; boardID = _arg.boardID, postID = _arg.postID; - protocol = Redirect.protocol(archive); - if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { - protocol = 'https://'; - } - URL = new String("" + protocol + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); + URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); URL.archive = archive; return URL; }, diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index 9eaa101c0..c34f48910 100755 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -24,7 +24,8 @@ Redirect = archives: '4plebs': domain: 'archive.4plebs.org' - http: true + http: true + https: true software: 'foolfuuka' boards: ['hr', 'tg', 'tv', 'x'] files: ['hr', 'tg', 'tv', 'x'] @@ -32,10 +33,10 @@ Redirect = 'fap archive': domain: 'fuuka.worldathleticproject.org' http: true - https: false + https: true software: 'foolfuuka' 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': domain: 'archive.foolz.us' @@ -59,8 +60,8 @@ Redirect = https: true withCredentials: true software: 'foolfuuka' - boards: ['a', 'co', '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'] + boards: ['a', 'co', 'd', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'], + files: ['a', 'd', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg'] 'Heinessen': domain: 'archive.heinessen.com' @@ -146,12 +147,7 @@ Redirect = post: (archive, {boardID, postID}) -> # For fuuka-based archives: # https://github.com/eksopl/fuuka/issues/27 - protocol = Redirect.protocol archive - # 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 = new String "#{Redirect.protocol archive}#{archive.domain}/_/api/chan/post/?board=#{boardID}&num=#{postID}" URL.archive = archive URL