1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 09:27:24 +01:00

Fixes catalog href on a potential /res/ board

This commit is contained in:
Nebs 2014-09-25 18:27:39 -05:00
parent 5cbdbd312a
commit 4c6cc59a37

View File

@ -16,11 +16,11 @@ function catalog() {
var board = $("input[name='board']");
if (board.length>0) {
if (window.location.href.indexOf("/res/")==-1){ //if we are inside a thread
var catalog_url = 'catalog.html';
if (window.location.pathname.indexOf("/res/")>0){ //if we are inside a thread
var catalog_url = '../catalog.html';
}
else {
var catalog_url = '../catalog.html';
var catalog_url = 'catalog.html';
}
var pages = document.getElementsByClassName('pages')[0];
var bottom = document.getElementsByClassName('boardlist bottom')[0]