Deal with 304 status with board navigation
This commit is contained in:
parent
879206219b
commit
3b7aa9f398
@ -2192,6 +2192,7 @@
|
||||
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
||||
return;
|
||||
}
|
||||
this.board = "" + g.BOARD;
|
||||
this.button = $.el('a', {
|
||||
className: 'index-refresh-shortcut fa fa-refresh',
|
||||
title: 'Refresh',
|
||||
@ -2585,7 +2586,8 @@
|
||||
}
|
||||
Navigate.title();
|
||||
try {
|
||||
if (req.status === 200) {
|
||||
if (req.status === 200 || Index.board !== ("" + g.BOARD)) {
|
||||
Index.board = "" + g.BOARD;
|
||||
Index.parse(JSON.parse(req.response), pageNum);
|
||||
} else if (req.status === 304 && (pageNum != null)) {
|
||||
Index.pageNav(pageNum);
|
||||
|
||||
@ -2202,6 +2202,7 @@
|
||||
if (g.BOARD.ID === 'f' || g.VIEW === 'catalog' || !Conf['JSON Navigation']) {
|
||||
return;
|
||||
}
|
||||
this.board = "" + g.BOARD;
|
||||
this.button = $.el('a', {
|
||||
className: 'index-refresh-shortcut fa fa-refresh',
|
||||
title: 'Refresh',
|
||||
@ -2595,7 +2596,8 @@
|
||||
}
|
||||
Navigate.title();
|
||||
try {
|
||||
if (req.status === 200) {
|
||||
if (req.status === 200 || Index.board !== ("" + g.BOARD)) {
|
||||
Index.board = "" + g.BOARD;
|
||||
Index.parse(JSON.parse(req.response), pageNum);
|
||||
} else if (req.status === 304 && (pageNum != null)) {
|
||||
Index.pageNav(pageNum);
|
||||
|
||||
@ -2,6 +2,8 @@ Index =
|
||||
init: ->
|
||||
return if g.BOARD.ID is 'f' or g.VIEW is 'catalog' or !Conf['JSON Navigation']
|
||||
|
||||
@board = "#{g.BOARD}"
|
||||
|
||||
@button = $.el 'a',
|
||||
className: 'index-refresh-shortcut fa fa-refresh'
|
||||
title: 'Refresh'
|
||||
@ -274,7 +276,8 @@ Index =
|
||||
Navigate.title()
|
||||
|
||||
try
|
||||
if req.status is 200
|
||||
if req.status is 200 or Index.board isnt "#{g.BOARD}"
|
||||
Index.board = "#{g.BOARD}"
|
||||
Index.parse JSON.parse(req.response), pageNum
|
||||
else if req.status is 304 and pageNum?
|
||||
Index.pageNav pageNum
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user