From 86b44f1c60439edc18568799c120fced6a1b3e7d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 18 Jun 2013 22:04:05 +0200 Subject: [PATCH] Update archive redirection for /pol/ and /vg/. --- 4chan_x.user.js | 12 +++++------- changelog | 2 ++ script.coffee | 16 +++++----------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index cd803f6f0..4e6e32f8b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4930,6 +4930,7 @@ case 'm': case 'q': case 'tg': + case 'vg': case 'vp': case 'vr': case 'wsg': @@ -4950,8 +4951,6 @@ case 'h': case 'v': return "//loveisover.me/" + board + "/full_image/" + filename; - case 'vg': - return "http://nth.pensivenonsen.se/" + board + "/full_image/" + filename; case 'adv': case 'asp': case 'cm': @@ -4994,6 +4993,7 @@ case 'sp': case 'tg': case 'tv': + case 'vg': case 'vp': case 'vr': case 'wsg': @@ -5015,8 +5015,6 @@ case 'h': case 'v': return "//loveisover.me/_/api/chan/post/?board=" + board + "&num=" + postID; - case 'vg': - return "http://nth.pensivenonsen.se/_/api/chan/post/?board=" + board + "&num=" + postID; case 'adv': case 'asp': case 'cm': @@ -5026,6 +5024,7 @@ case 'n': case 'o': case 'p': + case 'pol': case 's': case 's4s': case 't': @@ -5050,6 +5049,7 @@ case 'sp': case 'tg': case 'tv': + case 'vg': case 'vp': case 'vr': case 'wsg': @@ -5077,9 +5077,6 @@ case 'v': url = Redirect.path('//loveisover.me', 'foolfuuka', data); break; - case 'vg': - url = Redirect.path('http://nth.pensivenonsen.se', 'foolfuuka', data); - break; case 'adv': case 'asp': case 'cm': @@ -5089,6 +5086,7 @@ case 'n': case 'o': case 'p': + case 'pol': case 's': case 's4s': case 't': diff --git a/changelog b/changelog index ebde5d4bb..4aca36703 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Update archive redirection for /pol/ and /vg/. 2.39.6 - Mayhem diff --git a/script.coffee b/script.coffee index 40681cad5..d2101622a 100644 --- a/script.coffee +++ b/script.coffee @@ -4086,7 +4086,7 @@ Redirect = image: (board, filename) -> # Do not use g.BOARD, the image url can originate from a cross-quote. switch board - when 'a', 'gd', 'jp', 'm', 'q', 'tg', 'vp', 'vr', 'wsg' + when 'a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg' "//archive.foolz.us/#{board}/full_image/#{filename}" when 'u' "//nsfw.foolz.us/#{board}/full_image/#{filename}" @@ -4098,8 +4098,6 @@ Redirect = "//archive.nyafuu.org/#{board}/full_image/#{filename}" when 'd', 'h', 'v' "//loveisover.me/#{board}/full_image/#{filename}" - when 'vg' - "http://nth.pensivenonsen.se/#{board}/full_image/#{filename}" when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y' "//archive.foolzashit.com/#{board}/full_image/#{filename}" when 'cgl', 'g', 'mu' @@ -4112,7 +4110,7 @@ Redirect = # XXX foolz had HSTS set for 120 days, which broke XHR+CORS+Redirection when on HTTP. # Remove necessary HTTPS procotol in September 2013. switch board - when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vp', 'vr', 'wsg' + when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vg', 'vp', 'vr', 'wsg' "https://archive.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}" when 'u' "https://nsfw.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}" @@ -4124,16 +4122,14 @@ Redirect = "//archive.nyafuu.org/_/api/chan/post/?board=#{board}&num=#{postID}" when 'd', 'h', 'v' "//loveisover.me/_/api/chan/post/?board=#{board}&num=#{postID}" - when 'vg' - "http://nth.pensivenonsen.se/_/api/chan/post/?board=#{board}&num=#{postID}" - when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y' + when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y' "//archive.foolzashit.com/_/api/chan/post/?board=#{board}&num=#{postID}" to: (data) -> unless data.isSearch {threadID} = data {board} = data switch board - when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vp', 'vr', 'wsg' + when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vg', 'vp', 'vr', 'wsg' url = Redirect.path '//archive.foolz.us', 'foolfuuka', data when 'u' url = Redirect.path '//nsfw.foolz.us', 'foolfuuka', data @@ -4145,9 +4141,7 @@ Redirect = url = Redirect.path '//archive.nyafuu.org', 'foolfuuka', data when 'd', 'h', 'v' url = Redirect.path '//loveisover.me', 'foolfuuka', data - when 'vg' - url = Redirect.path 'http://nth.pensivenonsen.se', 'foolfuuka', data - when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y' + when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y' url = Redirect.path '//archive.foolzashit.com', 'foolfuuka', data when 'diy', 'g', 'sci' url = Redirect.path '//archive.installgentoo.net', 'fuuka', data