summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorNebs <nebs@openmailbox.org>2014-09-25 18:27:39 -0500
committerczaks <marcin@6irc.net>2014-09-26 13:10:21 +0200
commitab2a83d194eb7bfd2fe82942333fe55cb4cb4c16 (patch)
treebb6aaeed04f0ccc4903249922b6b0949d14c53ce /js
parentb7592c3eecd5346851cfc0b1450e4a3c3b6bb543 (diff)
Fixes catalog href on a potential /res/ board
Diffstat (limited to 'js')
-rw-r--r--js/catalog-link.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/catalog-link.js b/js/catalog-link.js
index 899e6859..5c5d9b13 100644
--- a/js/catalog-link.js
+++ b/js/catalog-link.js
@@ -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]