From d0e2d1a5834f525c163562854f527e21de787026 Mon Sep 17 00:00:00 2001 From: Kabir Sala Date: Mon, 24 Feb 2014 23:41:08 +0100 Subject: [PATCH] Release 4chan X v1.4.0. --- builds/4chan-X.user.js | 228 ----------------------------------------- builds/crx/script.js | 228 ----------------------------------------- 2 files changed, 456 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index c4371e967..dbf3ccaf6 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -10480,234 +10480,6 @@ } }; - Redirect = { - init: function() { - var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1, _ref2; - o = { - thread: {}, - post: {}, - file: {} - }; - 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; - for (_j = 0, _len1 = boards.length; _j < _len1; _j++) { - boardID = boards[_j]; - if (!(boardID in o.thread)) { - o.thread[boardID] = data; - } - if (!(boardID in o.post || software !== 'foolfuuka')) { - o.post[boardID] = data; - } - if (!(boardID in o.file || __indexOf.call(files, boardID) < 0)) { - o.file[boardID] = data; - } - } - } - _ref2 = Conf['selectedArchives']; - for (boardID in _ref2) { - record = _ref2[boardID]; - for (type in record) { - id = record[type]; - if (!((archive = archives[id]))) { - continue; - } - boards = type === 'file' ? archive.files : archive.boards; - if (__indexOf.call(boards, boardID) < 0) { - continue; - } - o[type][boardID] = archive.data; - } - } - return Redirect.data = o; - }, - archives: [ - { - name: "Foolz", - boards: ["a", "biz", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "gd", "jp", "m", "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", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"], - files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "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.com", - boards: ["g", "t"], - files: ["g", "t"], - data: { - domain: "chan.installgentoo.com", - http: true, - software: "foolfuuka" - } - }, { - name: "Foolz Beta", - boards: ["a", "biz", "co", "d", "gd", "jp", "m", "mlp", "s4s", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "d", "gd", "jp", "m", "s4s", "tg", "u", "vg", "vp", "vr", "wsg"], - data: { - domain: "beta.foolz.us", - http: true, - https: true, - withCredentials: true, - software: "foolfuuka" - } - } - ], - to: function(dest, data) { - var archive; - archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; - if (!archive) { - return ''; - } - return Redirect[dest](archive, data); - }, - protocol: function(archive) { - var protocol; - protocol = location.protocol; - if (!archive[protocol.slice(0, -1)]) { - protocol = protocol === 'https:' ? 'http:' : 'https:'; - } - return "" + protocol + "//"; - }, - thread: function(archive, _arg) { - var boardID, path, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; - path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; - if (archive.software === 'foolfuuka') { - path += '/'; - } - if (threadID && postID) { - path += archive.software === 'foolfuuka' ? "#" + postID : "#p" + postID; - } - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; - }, - post: function(archive, _arg) { - var URL, boardID, postID; - boardID = _arg.boardID, postID = _arg.postID; - URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); - URL.archive = archive; - return URL; - }, - file: function(archive, _arg) { - var boardID, filename; - boardID = _arg.boardID, filename = _arg.filename; - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; - }, - search: function(archive, _arg) { - var boardID, path, type, value; - boardID = _arg.boardID, type = _arg.type, value = _arg.value; - type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; - value = encodeURIComponent(value); - path = archive.software === 'foolfuuka' ? "" + boardID + "/search/" + type + "/" + value : "" + boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value; - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; - } - }; - PSAHiding = { init: function() { if (!Conf['Announcement Hiding']) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 6a69fa35e..735d6b5ec 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10483,234 +10483,6 @@ } }; - Redirect = { - init: function() { - var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _j, _len, _len1, _ref, _ref1, _ref2; - o = { - thread: {}, - post: {}, - file: {} - }; - 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; - for (_j = 0, _len1 = boards.length; _j < _len1; _j++) { - boardID = boards[_j]; - if (!(boardID in o.thread)) { - o.thread[boardID] = data; - } - if (!(boardID in o.post || software !== 'foolfuuka')) { - o.post[boardID] = data; - } - if (!(boardID in o.file || __indexOf.call(files, boardID) < 0)) { - o.file[boardID] = data; - } - } - } - _ref2 = Conf['selectedArchives']; - for (boardID in _ref2) { - record = _ref2[boardID]; - for (type in record) { - id = record[type]; - if (!((archive = archives[id]))) { - continue; - } - boards = type === 'file' ? archive.files : archive.boards; - if (__indexOf.call(boards, boardID) < 0) { - continue; - } - o[type][boardID] = archive.data; - } - } - return Redirect.data = o; - }, - archives: [ - { - name: "Foolz", - boards: ["a", "biz", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "gd", "jp", "m", "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", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"], - files: ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "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.com", - boards: ["g", "t"], - files: ["g", "t"], - data: { - domain: "chan.installgentoo.com", - http: true, - software: "foolfuuka" - } - }, { - name: "Foolz Beta", - boards: ["a", "biz", "co", "d", "gd", "jp", "m", "mlp", "s4s", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - files: ["a", "biz", "d", "gd", "jp", "m", "s4s", "tg", "u", "vg", "vp", "vr", "wsg"], - data: { - domain: "beta.foolz.us", - http: true, - https: true, - withCredentials: true, - software: "foolfuuka" - } - } - ], - to: function(dest, data) { - var archive; - archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; - if (!archive) { - return ''; - } - return Redirect[dest](archive, data); - }, - protocol: function(archive) { - var protocol; - protocol = location.protocol; - if (!archive[protocol.slice(0, -1)]) { - protocol = protocol === 'https:' ? 'http:' : 'https:'; - } - return "" + protocol + "//"; - }, - thread: function(archive, _arg) { - var boardID, path, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; - path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; - if (archive.software === 'foolfuuka') { - path += '/'; - } - if (threadID && postID) { - path += archive.software === 'foolfuuka' ? "#" + postID : "#p" + postID; - } - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; - }, - post: function(archive, _arg) { - var URL, boardID, postID; - boardID = _arg.boardID, postID = _arg.postID; - URL = new String("" + (Redirect.protocol(archive)) + archive.domain + "/_/api/chan/post/?board=" + boardID + "&num=" + postID); - URL.archive = archive; - return URL; - }, - file: function(archive, _arg) { - var boardID, filename; - boardID = _arg.boardID, filename = _arg.filename; - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; - }, - search: function(archive, _arg) { - var boardID, path, type, value; - boardID = _arg.boardID, type = _arg.type, value = _arg.value; - type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; - value = encodeURIComponent(value); - path = archive.software === 'foolfuuka' ? "" + boardID + "/search/" + type + "/" + value : "" + boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value; - return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path; - } - }; - PSAHiding = { init: function() { if (!Conf['Announcement Hiding']) {