Add /wsg/ archive redirection for threads and images.

This commit is contained in:
Nicolas Stepien 2012-07-11 16:01:05 +02:00
parent 05cb2fcd3c
commit d0ec997182
3 changed files with 8 additions and 4 deletions

View File

@ -2882,7 +2882,6 @@
if (state !== 'visible') { if (state !== 'visible') {
return; return;
} }
$.log(state);
Updater.unsuccessfulFetchCount = 0; Updater.unsuccessfulFetchCount = 0;
if (Updater.timer.textContent < -Conf['Interval']) { if (Updater.timer.textContent < -Conf['Interval']) {
return Updater.timer.textContent = -Updater.getInterval(); return Updater.timer.textContent = -Updater.getInterval();
@ -4376,6 +4375,7 @@
case 'sp': case 'sp':
case 'tg': case 'tg':
case 'vg': case 'vg':
case 'wsg':
return "//archive.foolz.us/" + board + "/full_image/" + filename; return "//archive.foolz.us/" + board + "/full_image/" + filename;
case 'u': case 'u':
return "//nsfw.foolz.us/" + board + "/full_image/" + filename; return "//nsfw.foolz.us/" + board + "/full_image/" + filename;
@ -4392,6 +4392,7 @@
case 'tv': case 'tv':
case 'v': case 'v':
case 'vg': case 'vg':
case 'wsg':
case 'dev': case 'dev':
case 'foolz': case 'foolz':
return "//archive.foolz.us/api/chan/post/board/" + board + "/num/" + postID + "/format/json"; return "//archive.foolz.us/api/chan/post/board/" + board + "/num/" + postID + "/format/json";
@ -4416,6 +4417,7 @@
case 'tv': case 'tv':
case 'v': case 'v':
case 'vg': case 'vg':
case 'wsg':
case 'dev': case 'dev':
case 'foolz': case 'foolz':
url = "//archive.foolz.us/" + path + "/"; url = "//archive.foolz.us/" + path + "/";

View File

@ -1,4 +1,6 @@
master master
- Mayhem
Add /wsg/ archive redirection.
2.34.0 2.34.0
- Mayhem - Mayhem

View File

@ -3479,7 +3479,7 @@ Redirect =
image: (board, filename) -> image: (board, filename) ->
# Do not use g.BOARD, the image url can originate from a cross-quote. # Do not use g.BOARD, the image url can originate from a cross-quote.
switch board switch board
when 'a', 'jp', 'm', 'sp', 'tg', 'vg' when 'a', 'jp', 'm', 'sp', 'tg', 'vg', 'wsg'
"//archive.foolz.us/#{board}/full_image/#{filename}" "//archive.foolz.us/#{board}/full_image/#{filename}"
when 'u' when 'u'
"//nsfw.foolz.us/#{board}/full_image/#{filename}" "//nsfw.foolz.us/#{board}/full_image/#{filename}"
@ -3492,7 +3492,7 @@ Redirect =
# "https://md401.homelinux.net/4chan/cgi-board.pl/#{board}/full_image/#{filename}" # "https://md401.homelinux.net/4chan/cgi-board.pl/#{board}/full_image/#{filename}"
post: (board, postID) -> post: (board, postID) ->
switch board switch board
when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'dev', 'foolz' when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
"//archive.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json" "//archive.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
when 'u', 'kuku' when 'u', 'kuku'
"//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json" "//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
@ -3505,7 +3505,7 @@ Redirect =
else else
"#{board}/post/#{postID}" "#{board}/post/#{postID}"
switch board switch board
when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'dev', 'foolz' when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
url = "//archive.foolz.us/#{path}/" url = "//archive.foolz.us/#{path}/"
if threadID and postID if threadID and postID
url += "##{postID}" url += "##{postID}"