forked from GithubBackups/vichan
Add mod.php logic
This commit is contained in:
parent
4a151acb18
commit
ea08c250fa
@ -14,11 +14,17 @@
|
|||||||
|
|
||||||
function catalog() {
|
function catalog() {
|
||||||
var board = $("input[name='board']");
|
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 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 subtitle = document.getElementsByClassName('subtitle')[0];
|
||||||
|
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
@ -29,13 +35,12 @@ if (pages) {
|
|||||||
link.style.color = '#F10000';
|
link.style.color = '#F10000';
|
||||||
link.style.padding = '4px';
|
link.style.padding = '4px';
|
||||||
link.style.paddingLeft = '9px';
|
link.style.paddingLeft = '9px';
|
||||||
link.style.borderLeft = '1px solid'
|
link.style.borderLeft = '1px solid';
|
||||||
link.style.borderLeftColor = '#A8A8A8';
|
link.style.borderLeftColor = '#A8A8A8';
|
||||||
link.style.textDecoration = "underline";
|
link.style.textDecoration = "underline";
|
||||||
|
|
||||||
pages.appendChild(link)
|
pages.appendChild(link);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
link.textContent = '['+_('Catalog')+']';
|
link.textContent = '['+_('Catalog')+']';
|
||||||
link.style.paddingLeft = '10px';
|
link.style.paddingLeft = '10px';
|
||||||
link.style.textDecoration = "underline";
|
link.style.textDecoration = "underline";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user