Fix redirection loop. #932
This commit is contained in:
parent
cc842807c8
commit
a45a9fe641
@ -7417,20 +7417,21 @@
|
||||
}
|
||||
},
|
||||
initReady: function() {
|
||||
var board, boardChild, errors, posts, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1;
|
||||
if (!$.hasClass(doc, 'fourchan-x')) {
|
||||
Main.initStyle();
|
||||
}
|
||||
var board, boardChild, errors, href, posts, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1;
|
||||
if (d.title === '4chan - 404 Not Found') {
|
||||
if (Conf['404 Redirect'] && g.VIEW === 'thread') {
|
||||
location.href = Redirect.to({
|
||||
href = Redirect.to({
|
||||
board: g.BOARD,
|
||||
threadID: g.THREAD,
|
||||
postID: location.hash
|
||||
});
|
||||
location.href = href || ("/" + g.BOARD + "/");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!$.hasClass(doc, 'fourchan-x')) {
|
||||
Main.initStyle();
|
||||
}
|
||||
if (board = $('.board')) {
|
||||
threads = [];
|
||||
posts = [];
|
||||
|
||||
@ -397,18 +397,19 @@ Main =
|
||||
$.on mainStyleSheet, 'DOMAttrModified', setStyle
|
||||
|
||||
initReady: ->
|
||||
unless $.hasClass doc, 'fourchan-x'
|
||||
# Something might have gone wrong!
|
||||
Main.initStyle()
|
||||
|
||||
if d.title is '4chan - 404 Not Found'
|
||||
if Conf['404 Redirect'] and g.VIEW is 'thread'
|
||||
location.href = Redirect.to
|
||||
href = Redirect.to
|
||||
board: g.BOARD
|
||||
threadID: g.THREAD
|
||||
postID: location.hash
|
||||
location.href = href or "/#{g.BOARD}/"
|
||||
return
|
||||
|
||||
unless $.hasClass doc, 'fourchan-x'
|
||||
# Something might have gone wrong!
|
||||
Main.initStyle()
|
||||
|
||||
if board = $ '.board'
|
||||
threads = []
|
||||
posts = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user