diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cfe94e41..8cc0ef703 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**ccd0**: +- Update archives with data from MayhemYDG fork. + ### v1.4.5 *2014-04-03* diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1502ac0c6..52177c295 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -10242,7 +10242,7 @@ Redirect = { init: function() { - var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1, _ref2; + var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1; o = { thread: {}, post: {}, @@ -10251,13 +10251,9 @@ archives = {}; _ref = Redirect.archives; for (_i = 0, _len = _ref.length; _i < _len; _i++) { - _ref1 = _ref[_i], name = _ref1.name, boards = _ref1.boards, files = _ref1.files, data = _ref1.data; - archives[name] = { - boards: boards, - files: files, - data: data - }; - software = data.software; + data = _ref[_i]; + name = data.name, boards = data.boards, files = data.files, software = data.software; + archives[name] = data; for (_j = 0, _len1 = boards.length; _j < _len1; _j++) { boardID = boards[_j]; if (!(boardID in o.thread)) { @@ -10271,9 +10267,9 @@ } } } - _ref2 = Conf['selectedArchives']; - for (boardID in _ref2) { - record = _ref2[boardID]; + _ref1 = Conf['selectedArchives']; + for (boardID in _ref1) { + record = _ref1[boardID]; for (type in record) { id = record[type]; if (!((archive = archives[id]))) { @@ -10283,141 +10279,12 @@ if (__indexOf.call(boards, boardID) < 0) { continue; } - o[type][boardID] = archive.data; + o[type][boardID] = archive; } } return Redirect.data = o; }, - archives: [ - { - name: "Foolz", - boards: ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "diy", "gd", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"], - data: { - domain: "archive.foolz.us", - http: false, - https: true, - software: "foolfuuka" - } - }, { - name: "NSFW Foolz", - boards: ["u"], - files: ["u"], - data: { - domain: "nsfw.foolz.us", - http: false, - https: true, - software: "foolfuuka" - } - }, { - name: "The Dark Cave", - boards: ["c", "int", "out", "po"], - files: ["c", "po"], - data: { - domain: "archive.thedarkcave.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "4plebs", - boards: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"], - files: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"], - data: { - domain: "archive.4plebs.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Nyafuu", - boards: ["c", "e", "w", "wg"], - files: ["c", "e", "w", "wg"], - data: { - domain: "archive.nyafuu.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Love is Over", - boards: ["d", "i"], - files: ["d", "i"], - data: { - domain: "loveisover.me", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Rebecca Black Tech", - boards: ["cgl", "g", "mu", "w"], - files: ["cgl", "g", "mu", "w"], - data: { - domain: "archive.rebeccablacktech.com", - http: true, - https: true, - software: "fuuka" - } - }, { - name: "Heinessen", - boards: ["an", "fit", "k", "mlp", "r9k", "toy"], - files: ["an", "fit", "k", "r9k", "toy"], - data: { - domain: "archive.heinessen.com", - http: true, - software: "fuuka" - } - }, { - name: "warosu", - boards: ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"], - files: ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"], - data: { - domain: "fuuka.warosu.org", - https: true, - software: "fuuka" - } - }, { - name: "fgts", - boards: ["r", "soc"], - files: ["r", "soc"], - data: { - domain: "fgst.eu", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "maware", - boards: ["t"], - files: ["t"], - data: { - domain: "archive.mawa.re", - http: true, - software: "foolfuuka" - } - }, { - name: "InstallGentoo", - boards: ["g", "t"], - files: ["g", "t"], - data: { - domain: "chan.installgentoo.com", - http: true, - software: "foolfuuka" - } - }, { - name: "Foolz Beta", - boards: ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"], - data: { - domain: "beta.foolz.us", - http: true, - https: true, - withCredentials: true, - software: "foolfuuka" - } - } - ], + archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","v","vg","vp","vr","wsg"],"files":["a","biz","gd","diy","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i"],"files":["d","i"]},{"uid":8,"name":"Rebecca Black Tech","domain":"archive.rebeccablacktech.com","http":true,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["cm","hm","r","soc","y"],"files":["cm","hm","r","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","jp","m","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":["a","biz","d","diy","gd","jp","m","s4s","sci","tg","u","vg","vp","vr","wsg"]}], to: function(dest, data) { var archive; archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; @@ -12905,7 +12772,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archBoards, boardID, boardOptions, boardSelect, boards, data, event, files, input, inputs, item, items, name, o, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; + var archBoards, boardID, boardOptions, boardSelect, boards, event, files, input, inputs, item, items, name, o, row, rows, software, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; section.innerHTML = "
"; items = {}; inputs = {}; @@ -12945,7 +12812,7 @@ archBoards = {}; _ref1 = Redirect.archives; for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, data = _ref2.data; + _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, software = _ref2.software; for (_k = 0, _len2 = boards.length; _k < _len2; _k++) { boardID = boards[_k]; o = archBoards[boardID] || (archBoards[boardID] = { @@ -12954,7 +12821,7 @@ file: [] }); o.thread.push(name); - if (data.software === 'foolfuuka') { + if (software === 'foolfuuka') { o.post.push(name); } if (__indexOf.call(files, boardID) >= 0) { @@ -12993,7 +12860,7 @@ return $("tbody > ." + this.value, table).hidden = false; }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { - var option, selectedArchives, type; + var data, option, selectedArchives, type; selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; diff --git a/builds/crx/script.js b/builds/crx/script.js index 63368e721..ae88bba0d 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10245,7 +10245,7 @@ Redirect = { init: function() { - var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1, _ref2; + var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1; o = { thread: {}, post: {}, @@ -10254,13 +10254,9 @@ archives = {}; _ref = Redirect.archives; for (_i = 0, _len = _ref.length; _i < _len; _i++) { - _ref1 = _ref[_i], name = _ref1.name, boards = _ref1.boards, files = _ref1.files, data = _ref1.data; - archives[name] = { - boards: boards, - files: files, - data: data - }; - software = data.software; + data = _ref[_i]; + name = data.name, boards = data.boards, files = data.files, software = data.software; + archives[name] = data; for (_j = 0, _len1 = boards.length; _j < _len1; _j++) { boardID = boards[_j]; if (!(boardID in o.thread)) { @@ -10274,9 +10270,9 @@ } } } - _ref2 = Conf['selectedArchives']; - for (boardID in _ref2) { - record = _ref2[boardID]; + _ref1 = Conf['selectedArchives']; + for (boardID in _ref1) { + record = _ref1[boardID]; for (type in record) { id = record[type]; if (!((archive = archives[id]))) { @@ -10286,141 +10282,12 @@ if (__indexOf.call(boards, boardID) < 0) { continue; } - o[type][boardID] = archive.data; + o[type][boardID] = archive; } } return Redirect.data = o; }, - archives: [ - { - name: "Foolz", - boards: ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "diy", "gd", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"], - data: { - domain: "archive.foolz.us", - http: false, - https: true, - software: "foolfuuka" - } - }, { - name: "NSFW Foolz", - boards: ["u"], - files: ["u"], - data: { - domain: "nsfw.foolz.us", - http: false, - https: true, - software: "foolfuuka" - } - }, { - name: "The Dark Cave", - boards: ["c", "int", "out", "po"], - files: ["c", "po"], - data: { - domain: "archive.thedarkcave.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "4plebs", - boards: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"], - files: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"], - data: { - domain: "archive.4plebs.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Nyafuu", - boards: ["c", "e", "w", "wg"], - files: ["c", "e", "w", "wg"], - data: { - domain: "archive.nyafuu.org", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Love is Over", - boards: ["d", "i"], - files: ["d", "i"], - data: { - domain: "loveisover.me", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "Rebecca Black Tech", - boards: ["cgl", "g", "mu", "w"], - files: ["cgl", "g", "mu", "w"], - data: { - domain: "archive.rebeccablacktech.com", - http: true, - https: true, - software: "fuuka" - } - }, { - name: "Heinessen", - boards: ["an", "fit", "k", "mlp", "r9k", "toy"], - files: ["an", "fit", "k", "r9k", "toy"], - data: { - domain: "archive.heinessen.com", - http: true, - software: "fuuka" - } - }, { - name: "warosu", - boards: ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"], - files: ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"], - data: { - domain: "fuuka.warosu.org", - https: true, - software: "fuuka" - } - }, { - name: "fgts", - boards: ["r", "soc"], - files: ["r", "soc"], - data: { - domain: "fgst.eu", - http: true, - https: true, - software: "foolfuuka" - } - }, { - name: "maware", - boards: ["t"], - files: ["t"], - data: { - domain: "archive.mawa.re", - http: true, - software: "foolfuuka" - } - }, { - name: "InstallGentoo", - boards: ["g", "t"], - files: ["g", "t"], - data: { - domain: "chan.installgentoo.com", - http: true, - software: "foolfuuka" - } - }, { - name: "Foolz Beta", - boards: ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"], - data: { - domain: "beta.foolz.us", - http: true, - https: true, - withCredentials: true, - software: "foolfuuka" - } - } - ], + archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","v","vg","vp","vr","wsg"],"files":["a","biz","gd","diy","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i"],"files":["d","i"]},{"uid":8,"name":"Rebecca Black Tech","domain":"archive.rebeccablacktech.com","http":true,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["cm","hm","r","soc","y"],"files":["cm","hm","r","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","jp","m","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":["a","biz","d","diy","gd","jp","m","s4s","sci","tg","u","vg","vp","vr","wsg"]}], to: function(dest, data) { var archive; archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; @@ -12905,7 +12772,7 @@ return $.on(ta, 'change', $.cb.value); }, advanced: function(section) { - var archBoards, boardID, boardOptions, boardSelect, boards, data, event, files, input, inputs, item, items, name, o, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; + var archBoards, boardID, boardOptions, boardSelect, boards, event, files, input, inputs, item, items, name, o, row, rows, software, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; section.innerHTML = ""; items = {}; inputs = {}; @@ -12945,7 +12812,7 @@ archBoards = {}; _ref1 = Redirect.archives; for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, data = _ref2.data; + _ref2 = _ref1[_j], name = _ref2.name, boards = _ref2.boards, files = _ref2.files, software = _ref2.software; for (_k = 0, _len2 = boards.length; _k < _len2; _k++) { boardID = boards[_k]; o = archBoards[boardID] || (archBoards[boardID] = { @@ -12954,7 +12821,7 @@ file: [] }); o.thread.push(name); - if (data.software === 'foolfuuka') { + if (software === 'foolfuuka') { o.post.push(name); } if (__indexOf.call(files, boardID) >= 0) { @@ -12993,7 +12860,7 @@ return $("tbody > ." + this.value, table).hidden = false; }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { - var option, selectedArchives, type; + var data, option, selectedArchives, type; selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index 210843a53..381c69ea9 100755 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -6,9 +6,9 @@ Redirect = file: {} archives = {} - for {name, boards, files, data} in Redirect.archives - archives[name] = {boards, files, data} - {software} = data + for data in Redirect.archives + {name, boards, files, software} = data + archives[name] = data for boardID in boards o.thread[boardID] = data unless boardID of o.thread o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka' @@ -18,125 +18,11 @@ Redirect = for type, id of record when (archive = archives[id]) boards = if type is 'file' then archive.files else archive.boards continue unless boardID in boards - o[type][boardID] = archive.data + o[type][boardID] = archive Redirect.data = o - archives: [ - name: "Foolz" - boards: ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"] - files: ["a", "biz", "diy", "gd", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"] - data: - domain: "archive.foolz.us" - http: false - https: true - software: "foolfuuka" - , - name: "NSFW Foolz" - boards: ["u"] - files: ["u"] - data: - domain: "nsfw.foolz.us" - http: false - https: true - software: "foolfuuka" - , - name: "The Dark Cave" - boards: ["c", "int", "out", "po"] - files: ["c", "po"] - data: - domain: "archive.thedarkcave.org" - http: true - https: true - software: "foolfuuka" - , - name: "4plebs" - boards: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"] - files: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"] - data: - domain: "archive.4plebs.org" - http: true - https: true - software: "foolfuuka" - , - name: "Nyafuu" - boards: ["c", "e", "w", "wg"] - files: ["c", "e", "w", "wg"] - data: - domain: "archive.nyafuu.org" - http: true - https: true - software: "foolfuuka" - , - name: "Love is Over" - boards: ["d", "i"] - files: ["d", "i"] - data: - domain: "loveisover.me" - http: true - https: true - software: "foolfuuka" - , - name: "Rebecca Black Tech" - boards: ["cgl", "g", "mu", "w"] - files: ["cgl", "g", "mu", "w"] - data: - domain: "archive.rebeccablacktech.com" - http: true - https: true - software: "fuuka" - , - name: "Heinessen" - boards: ["an", "fit", "k", "mlp", "r9k", "toy"] - files: ["an", "fit", "k", "r9k", "toy"] - data: - domain: "archive.heinessen.com" - http: true - software: "fuuka" - , - name: "warosu" - boards: ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"] - files: ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"] - data: - domain: "fuuka.warosu.org" - https: true - software: "fuuka" - , - name: "fgts" - boards: ["r", "soc"] - files: ["r", "soc"] - data: - domain: "fgst.eu" - http: true - https: true - software: "foolfuuka" - , - name: "maware" - boards: ["t"] - files: ["t"] - data: - domain: "archive.mawa.re" - http: true - software: "foolfuuka" - , - name: "InstallGentoo" - boards: ["g", "t"] - files: ["g", "t"] - data: - domain: "chan.installgentoo.com" - http: true - software: "foolfuuka" - , - name: "Foolz Beta" - boards: ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"] - data: - domain: "beta.foolz.us" - http: true - https: true - withCredentials: true - software: "foolfuuka" - ] + archives: `<%= JSON.stringify(grunt.file.readJSON('src/Archive/archives.json')) %>` to: (dest, data) -> archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID] diff --git a/src/Archive/archives.json b/src/Archive/archives.json new file mode 100644 index 000000000..73b76cd14 --- /dev/null +++ b/src/Archive/archives.json @@ -0,0 +1,128 @@ +[{ + "uid": 0, + "name": "Foolz", + "domain": "archive.foolz.us", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], + "files": ["a", "biz", "gd", "diy", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"] +}, { + "uid": 1, + "name": "NSFW Foolz", + "domain": "nsfw.foolz.us", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["u"], + "files": ["u"] +}, { + "uid": 2, + "name": "The Dark Cave", + "domain": "archive.thedarkcave.org", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["c", "int", "out", "po"], + "files": ["c", "po"] +}, { + "uid": 3, + "name": "4plebs Archive", + "domain": "archive.4plebs.org", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["adv", "hr", "o", "pol", "s4s", "tg", "trv", "tv", "x"], + "files": ["adv", "hr", "o", "pol", "s4s", "tg", "trv", "tv", "x"] +}, { + "uid": 18, + "name": "4plebs Flash Archive", + "domain": "flash.4plebs.org", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["f"], + "files": ["f"] +}, { + "uid": 4, + "name": "Nyafuu", + "domain": "archive.nyafuu.org", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["c", "e", "w", "wg"], + "files": ["c", "e", "w", "wg"] +}, { + "uid": 5, + "name": "Love is Over", + "domain": "loveisover.me", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["d", "i"], + "files": ["d", "i"] +}, { + "uid": 8, + "name": "Rebecca Black Tech", + "domain": "archive.rebeccablacktech.com", + "http": true, + "https": true, + "software": "fuuka", + "boards": ["cgl", "g", "mu", "w"], + "files": ["cgl", "g", "mu", "w"] +}, { + "uid": 9, + "name": "Heinessen", + "domain": "archive.heinessen.com", + "http": true, + "https": false, + "software": "fuuka", + "boards": ["an", "fit", "k", "mlp", "r9k", "toy"], + "files": ["an", "fit", "k", "r9k", "toy"] +}, { + "uid": 10, + "name": "warosu", + "domain": "fuuka.warosu.org", + "http": false, + "https": true, + "software": "fuuka", + "boards": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"], + "files": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"] +}, { + "uid": 15, + "name": "fgts", + "domain": "fgts.eu", + "http": true, + "https": true, + "software": "foolfuuka", + "boards": ["cm", "hm", "r", "soc", "y"], + "files": ["cm", "hm", "r", "soc", "y"] +}, { + "uid": 16, + "name": "maware", + "domain": "archive.mawa.re", + "http": true, + "https": false, + "software": "foolfuuka", + "boards": ["t"], + "files": ["t"] +}, { + "uid": 17, + "name": "installgentoo.com", + "domain": "chan.installgentoo.com", + "http": true, + "https": false, + "software": "foolfuuka", + "boards": ["g", "t"], + "files": ["g", "t"] +}, { + "uid": 13, + "name": "Foolz Beta", + "domain": "beta.foolz.us", + "http": true, + "https": true, + "withCredentials": true, + "software": "foolfuuka", + "boards": ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], + "files": ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"] +}] diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 0eaf7ec88..0f88308a9 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -306,14 +306,14 @@ Settings = $.on $.id('apply-css'), 'click', Settings.usercss archBoards = {} - for {name, boards, files, data} in Redirect.archives + for {name, boards, files, software} in Redirect.archives for boardID in boards o = archBoards[boardID] or= thread: [] post: [] file: [] o.thread.push name - o.post.push name if data.software is 'foolfuuka' + o.post.push name if software is 'foolfuuka' o.file.push name if boardID in files rows = []