1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-17 11:28:41 +01:00

Add mod.php logic

This commit is contained in:
RealAngeleno 2023-08-05 15:32:46 -07:00 committed by GitHub
parent 4a151acb18
commit ea08c250fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,11 +14,17 @@
function catalog() {
var board = $("input[name='board']");
var boardValue = board.first().val();
var catalog_url = configRoot + board.first().val() + "/catalog.html";
var catalog_url = '';
if (window.location.href.includes('mod.php?/')) {
catalog_url = configRoot + 'mod.php?/' + boardValue + '/catalog.html';
} else {
catalog_url = configRoot + boardValue + '/catalog.html';
}
var pages = document.getElementsByClassName('pages')[0];
var bottom = document.getElementsByClassName('boardlist bottom')[0]
var bottom = document.getElementsByClassName('boardlist bottom')[0];
var subtitle = document.getElementsByClassName('subtitle')[0];
var link = document.createElement('a');
@ -29,13 +35,12 @@ if (pages) {
link.style.color = '#F10000';
link.style.padding = '4px';
link.style.paddingLeft = '9px';
link.style.borderLeft = '1px solid'
link.style.borderLeft = '1px solid';
link.style.borderLeftColor = '#A8A8A8';
link.style.textDecoration = "underline";
pages.appendChild(link)
}
else {
pages.appendChild(link);
} else {
link.textContent = '['+_('Catalog')+']';
link.style.paddingLeft = '10px';
link.style.textDecoration = "underline";