Merge branch 'v3'

Conflicts:
	LICENSE
	builds/appchan-x.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2014-01-07 08:58:33 -07:00
commit 23118608b2
4 changed files with 257 additions and 232 deletions

View File

@ -1,5 +1,5 @@
/* /*
* appchan x - Version 2.7.5 - 2014-01-06 * appchan x - Version 2.7.5 - 2014-01-07
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -22,7 +22,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* appchan x - Version 2.7.5 - 2014-01-06 * appchan x - Version 2.7.5 - 2014-01-07
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -12060,133 +12060,143 @@
}; };
Redirect = { Redirect = {
data: {
thread: {},
post: {},
file: {}
},
init: function() { init: function() {
var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; var archive, archives, boardID, data, id, name, o, type, _i, _len, _ref, _ref1;
o = {
thread: {},
post: {},
file: {}
};
archives = Redirect.archives;
_ref = Conf['selectedArchives']; _ref = Conf['selectedArchives'];
for (boardID in _ref) { for (boardID in _ref) {
data = _ref[boardID]; data = _ref[boardID];
for (type in data) { for (type in data) {
id = data[type]; id = data[type];
if (archive = Redirect.archives[id]) { if ((archive = archives[id]) && __indexOf.call(archive[type] || archive['boards'], boardID) >= 0) {
boards = archive[type] || archive['boards']; o[type][boardID] = archive.data;
if (__indexOf.call(boards, boardID) < 0) {
continue;
}
Redirect.data[type][boardID] = archive;
} }
} }
} }
_ref1 = Redirect.archives; for (name in archives) {
for (name in _ref1) { archive = archives[name];
archive = _ref1[name]; _ref1 = archive.boards;
_ref2 = archive.boards; for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
for (_i = 0, _len = _ref2.length; _i < _len; _i++) { boardID = _ref1[_i];
boardID = _ref2[_i]; data = archive.data;
if (!(boardID in Redirect.data.thread)) { if (!(boardID in o.thread)) {
Redirect.data.thread[boardID] = archive; o.thread[boardID] = data;
} }
if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) { if (!(boardID in o.post || archive.software !== 'foolfuuka')) {
Redirect.data.post[boardID] = archive; o.post[boardID] = data;
} }
if (!(boardID in Redirect.data.file || __indexOf.call(archive.files, boardID) < 0)) { if (!(boardID in o.file || __indexOf.call(archive.files, boardID) < 0)) {
Redirect.data.file[boardID] = archive; o.file[boardID] = data;
} }
} }
} }
return Redirect.data = o;
}, },
archives: { archives: {
"Foolz": { "Foolz": {
domain: "archive.foolz.us",
http: false,
https: true,
software: "foolfuuka",
boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"] files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"],
data: {
domain: "archive.foolz.us",
http: false,
https: true,
software: "foolfuuka"
}
}, },
"NSFW Foolz": { "NSFW Foolz": {
domain: "nsfw.foolz.us",
http: false,
https: true,
software: "foolfuuka",
boards: ["u"], boards: ["u"],
files: ["u"] files: ["u"],
data: {
domain: "nsfw.foolz.us",
http: false,
https: true,
software: "foolfuuka"
}
}, },
"The Dark Cave": { "The Dark Cave": {
domain: "archive.thedarkcave.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["c", "int", "out", "po"], boards: ["c", "int", "out", "po"],
files: ["c", "po"] files: ["c", "po"],
data: {
domain: "archive.thedarkcave.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"4plebs": { "4plebs": {
domain: "archive.4plebs.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["hr", "pol", "s4s", "tg", "tv", "x"], boards: ["hr", "pol", "s4s", "tg", "tv", "x"],
files: ["hr", "pol", "s4s", "tg", "tv", "x"] files: ["hr", "pol", "s4s", "tg", "tv", "x"],
data: {
domain: "archive.4plebs.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"Nyafuu": { "Nyafuu": {
domain: "archive.nyafuu.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["c", "w", "wg"], boards: ["c", "w", "wg"],
files: ["c", "w", "wg"] files: ["c", "w", "wg"],
data: {
domain: "archive.nyafuu.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"Install Gentoo": { "Install Gentoo": {
domain: "archive.installgentoo.net",
http: false,
https: true,
software: "fuuka",
boards: ["diy", "g", "sci"], boards: ["diy", "g", "sci"],
files: [] files: [],
data: {
domain: "archive.installgentoo.net",
http: false,
https: true,
software: "fuuka"
}
}, },
"Rebecca Black Tech": { "Rebecca Black Tech": {
domain: "rbt.asia",
http: true,
https: true,
software: "fuuka",
boards: ["cgl", "g", "mu", "w"], boards: ["cgl", "g", "mu", "w"],
files: ["cgl", "g", "mu", "w"] files: ["cgl", "g", "mu", "w"],
data: {
domain: "rbt.asia",
http: true,
https: true,
software: "fuuka"
}
}, },
"Heinessen": { "Heinessen": {
domain: "archive.heinessen.com",
http: true,
software: "fuuka",
boards: ["an", "fit", "k", "mlp", "r9k", "toy"], boards: ["an", "fit", "k", "mlp", "r9k", "toy"],
files: ["an", "fit", "k", "r9k", "toy"] files: ["an", "fit", "k", "r9k", "toy"],
data: {
domain: "archive.heinessen.com",
http: true,
software: "fuuka"
}
}, },
"warosu": { "warosu": {
domain: "fuuka.warosu.org",
http: true,
https: true,
software: "fuuka",
boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"], boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"],
files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"] files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"],
}, data: {
"Bui's Archive": { domain: "fuuka.warosu.org",
domain: "archive.bui.pm", http: true,
http: true, https: true,
https: true, software: "fuuka"
software: "foolfuuka", }
boards: ["b"],
files: ["b"]
}, },
"Foolz Beta": { "Foolz Beta": {
domain: "beta.foolz.us",
http: true,
https: true,
withCredentials: true,
software: "foolfuuka",
boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"] files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"],
data: {
domain: "beta.foolz.us",
http: true,
https: true,
withCredentials: true,
software: "foolfuuka"
}
} }
}, },
to: function(dest, data) { to: function(dest, data) {

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript // Generated by CoffeeScript
/* /*
* appchan x - Version 2.7.5 - 2014-01-06 * appchan x - Version 2.7.5 - 2014-01-07
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -12050,133 +12050,143 @@
}; };
Redirect = { Redirect = {
data: {
thread: {},
post: {},
file: {}
},
init: function() { init: function() {
var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; var archive, archives, boardID, data, id, name, o, type, _i, _len, _ref, _ref1;
o = {
thread: {},
post: {},
file: {}
};
archives = Redirect.archives;
_ref = Conf['selectedArchives']; _ref = Conf['selectedArchives'];
for (boardID in _ref) { for (boardID in _ref) {
data = _ref[boardID]; data = _ref[boardID];
for (type in data) { for (type in data) {
id = data[type]; id = data[type];
if (archive = Redirect.archives[id]) { if ((archive = archives[id]) && __indexOf.call(archive[type] || archive['boards'], boardID) >= 0) {
boards = archive[type] || archive['boards']; o[type][boardID] = archive.data;
if (__indexOf.call(boards, boardID) < 0) {
continue;
}
Redirect.data[type][boardID] = archive;
} }
} }
} }
_ref1 = Redirect.archives; for (name in archives) {
for (name in _ref1) { archive = archives[name];
archive = _ref1[name]; _ref1 = archive.boards;
_ref2 = archive.boards; for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
for (_i = 0, _len = _ref2.length; _i < _len; _i++) { boardID = _ref1[_i];
boardID = _ref2[_i]; data = archive.data;
if (!(boardID in Redirect.data.thread)) { if (!(boardID in o.thread)) {
Redirect.data.thread[boardID] = archive; o.thread[boardID] = data;
} }
if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) { if (!(boardID in o.post || archive.software !== 'foolfuuka')) {
Redirect.data.post[boardID] = archive; o.post[boardID] = data;
} }
if (!(boardID in Redirect.data.file || __indexOf.call(archive.files, boardID) < 0)) { if (!(boardID in o.file || __indexOf.call(archive.files, boardID) < 0)) {
Redirect.data.file[boardID] = archive; o.file[boardID] = data;
} }
} }
} }
return Redirect.data = o;
}, },
archives: { archives: {
"Foolz": { "Foolz": {
domain: "archive.foolz.us",
http: false,
https: true,
software: "foolfuuka",
boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"] files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"],
data: {
domain: "archive.foolz.us",
http: false,
https: true,
software: "foolfuuka"
}
}, },
"NSFW Foolz": { "NSFW Foolz": {
domain: "nsfw.foolz.us",
http: false,
https: true,
software: "foolfuuka",
boards: ["u"], boards: ["u"],
files: ["u"] files: ["u"],
data: {
domain: "nsfw.foolz.us",
http: false,
https: true,
software: "foolfuuka"
}
}, },
"The Dark Cave": { "The Dark Cave": {
domain: "archive.thedarkcave.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["c", "int", "out", "po"], boards: ["c", "int", "out", "po"],
files: ["c", "po"] files: ["c", "po"],
data: {
domain: "archive.thedarkcave.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"4plebs": { "4plebs": {
domain: "archive.4plebs.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["hr", "pol", "s4s", "tg", "tv", "x"], boards: ["hr", "pol", "s4s", "tg", "tv", "x"],
files: ["hr", "pol", "s4s", "tg", "tv", "x"] files: ["hr", "pol", "s4s", "tg", "tv", "x"],
data: {
domain: "archive.4plebs.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"Nyafuu": { "Nyafuu": {
domain: "archive.nyafuu.org",
http: true,
https: true,
software: "foolfuuka",
boards: ["c", "w", "wg"], boards: ["c", "w", "wg"],
files: ["c", "w", "wg"] files: ["c", "w", "wg"],
data: {
domain: "archive.nyafuu.org",
http: true,
https: true,
software: "foolfuuka"
}
}, },
"Install Gentoo": { "Install Gentoo": {
domain: "archive.installgentoo.net",
http: false,
https: true,
software: "fuuka",
boards: ["diy", "g", "sci"], boards: ["diy", "g", "sci"],
files: [] files: [],
data: {
domain: "archive.installgentoo.net",
http: false,
https: true,
software: "fuuka"
}
}, },
"Rebecca Black Tech": { "Rebecca Black Tech": {
domain: "rbt.asia",
http: true,
https: true,
software: "fuuka",
boards: ["cgl", "g", "mu", "w"], boards: ["cgl", "g", "mu", "w"],
files: ["cgl", "g", "mu", "w"] files: ["cgl", "g", "mu", "w"],
data: {
domain: "rbt.asia",
http: true,
https: true,
software: "fuuka"
}
}, },
"Heinessen": { "Heinessen": {
domain: "archive.heinessen.com",
http: true,
software: "fuuka",
boards: ["an", "fit", "k", "mlp", "r9k", "toy"], boards: ["an", "fit", "k", "mlp", "r9k", "toy"],
files: ["an", "fit", "k", "r9k", "toy"] files: ["an", "fit", "k", "r9k", "toy"],
data: {
domain: "archive.heinessen.com",
http: true,
software: "fuuka"
}
}, },
"warosu": { "warosu": {
domain: "fuuka.warosu.org",
http: true,
https: true,
software: "fuuka",
boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"], boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"],
files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"] files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"],
}, data: {
"Bui's Archive": { domain: "fuuka.warosu.org",
domain: "archive.bui.pm", http: true,
http: true, https: true,
https: true, software: "fuuka"
software: "foolfuuka", }
boards: ["b"],
files: ["b"]
}, },
"Foolz Beta": { "Foolz Beta": {
domain: "beta.foolz.us",
http: true,
https: true,
withCredentials: true,
software: "foolfuuka",
boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"] files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"],
data: {
domain: "beta.foolz.us",
http: true,
https: true,
withCredentials: true,
software: "foolfuuka"
}
} }
}, },
to: function(dest, data) { to: function(dest, data) {

View File

@ -1,114 +1,119 @@
Redirect = Redirect =
data:
thread: {}
post: {}
file: {}
init: -> init: ->
o =
thread: {}
post: {}
file: {}
{archives} = Redirect
for boardID, data of Conf['selectedArchives'] for boardID, data of Conf['selectedArchives']
for type, id of data for type, id of data when (archive = archives[id]) and boardID in (archive[type] or archive['boards'])
if archive = Redirect.archives[id] o[type][boardID] = archive.data
boards = archive[type] or archive['boards']
continue unless boardID in boards for name, archive of archives
Redirect.data[type][boardID] = archive
for name, archive of Redirect.archives
for boardID in archive.boards for boardID in archive.boards
unless boardID of Redirect.data.thread {data} = archive
Redirect.data.thread[boardID] = archive unless boardID of o.thread
unless boardID of Redirect.data.post or archive.software isnt 'foolfuuka' o.thread[boardID] = data
Redirect.data.post[boardID] = archive unless boardID of o.post or archive.software isnt 'foolfuuka'
unless boardID of Redirect.data.file or boardID not in archive.files o.post[boardID] = data
Redirect.data.file[boardID] = archive unless boardID of o.file or boardID not in archive.files
return o.file[boardID] = data
Redirect.data = o
archives: archives:
"Foolz": "Foolz":
domain: "archive.foolz.us"
http: false
https: true
software: "foolfuuka"
boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"] boards: ["a", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"]
files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"] files: ["a", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"]
data:
domain: "archive.foolz.us"
http: false
https: true
software: "foolfuuka"
"NSFW Foolz": "NSFW Foolz":
domain: "nsfw.foolz.us"
http: false
https: true
software: "foolfuuka"
boards: ["u"] boards: ["u"]
files: ["u"] files: ["u"]
data:
domain: "nsfw.foolz.us"
http: false
https: true
software: "foolfuuka"
"The Dark Cave": "The Dark Cave":
domain: "archive.thedarkcave.org"
http: true
https: true
software: "foolfuuka"
boards: ["c", "int", "out", "po"] boards: ["c", "int", "out", "po"]
files: ["c", "po"] files: ["c", "po"]
data:
domain: "archive.thedarkcave.org"
http: true
https: true
software: "foolfuuka"
"4plebs": "4plebs":
domain: "archive.4plebs.org"
http: true
https: true
software: "foolfuuka"
boards: ["hr", "pol", "s4s", "tg", "tv", "x"] boards: ["hr", "pol", "s4s", "tg", "tv", "x"]
files: ["hr", "pol", "s4s", "tg", "tv", "x"] files: ["hr", "pol", "s4s", "tg", "tv", "x"]
data:
domain: "archive.4plebs.org"
http: true
https: true
software: "foolfuuka"
"Nyafuu": "Nyafuu":
domain: "archive.nyafuu.org"
http: true
https: true
software: "foolfuuka"
boards: ["c", "w", "wg"] boards: ["c", "w", "wg"]
files: ["c", "w", "wg"] files: ["c", "w", "wg"]
data:
domain: "archive.nyafuu.org"
http: true
https: true
software: "foolfuuka"
"Install Gentoo": "Install Gentoo":
domain: "archive.installgentoo.net"
http: false
https: true
software: "fuuka"
boards: ["diy", "g", "sci"] boards: ["diy", "g", "sci"]
files: [] files: []
data:
domain: "archive.installgentoo.net"
http: false
https: true
software: "fuuka"
"Rebecca Black Tech": "Rebecca Black Tech":
domain: "rbt.asia"
http: true
https: true
software: "fuuka"
boards: ["cgl", "g", "mu", "w"] boards: ["cgl", "g", "mu", "w"]
files: ["cgl", "g", "mu", "w"] files: ["cgl", "g", "mu", "w"]
data:
domain: "rbt.asia"
http: true
https: true
software: "fuuka"
"Heinessen": "Heinessen":
domain: "archive.heinessen.com"
http: true
software: "fuuka"
boards: ["an", "fit", "k", "mlp", "r9k", "toy"] boards: ["an", "fit", "k", "mlp", "r9k", "toy"]
files: ["an", "fit", "k", "r9k", "toy"] files: ["an", "fit", "k", "r9k", "toy"]
data:
domain: "archive.heinessen.com"
http: true
software: "fuuka"
"warosu": "warosu":
domain: "fuuka.warosu.org"
http: true
https: true
software: "fuuka"
boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"] boards: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"]
files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"] files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"]
data:
"Bui's Archive": domain: "fuuka.warosu.org"
domain: "archive.bui.pm" http: true
http: true https: true
https: true software: "fuuka"
software: "foolfuuka"
boards: ["b"]
files: ["b"]
"Foolz Beta": "Foolz Beta":
domain: "beta.foolz.us"
http: true
https: true
withCredentials: true
software: "foolfuuka"
boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], boards: ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"] files: ["a", "d", "gd", "h", "jp", "m", "tg", "u", "vg", "vp", "vr", "wsg"]
data:
domain: "beta.foolz.us"
http: true
https: true
withCredentials: true
software: "foolfuuka"
to: (dest, data) -> to: (dest, data) ->
archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID] archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID]