master #15

Merged
kibi merged 4 commits from master into f0ckv2 2026-07-17 21:53:32 +00:00
2 changed files with 50 additions and 5 deletions
Showing only changes of commit 5ef0d5c62e - Show all commits

View File

@@ -8597,10 +8597,12 @@ class NotificationSystem {
window.location.pathname.includes('/user/'); window.location.pathname.includes('/user/');
// UPDATE ITEM VIEW NAVIGATION DYNAMICALLY // UPDATE ITEM VIEW NAVIGATION DYNAMICALLY
const prevBtn = document.getElementById('prev');
const nextBtn = document.getElementById('next'); const nextBtn = document.getElementById('next');
const isItemView = !!document.getElementById('prev') || !!nextBtn; const isItemView = !!prevBtn || !!nextBtn;
if (isItemView && !isFilteredView && nextBtn && (nextBtn.getAttribute('href') === '#' || nextBtn.getAttribute('href') === '')) { // #prev points to newer items (pagination.next). If it's disabled, we are at the newest item.
if (isItemView && !isFilteredView && prevBtn && (prevBtn.getAttribute('href') === '#' || prevBtn.getAttribute('href') === '')) {
let filtered = false; let filtered = false;
if (typeof window.activeMode !== 'undefined' && window.activeMode !== 3) { if (typeof window.activeMode !== 'undefined' && window.activeMode !== 3) {
const nsflId = window.f0ckSession?.nsfl_tag_id || 3; const nsflId = window.f0ckSession?.nsfl_tag_id || 3;
@@ -8612,10 +8614,18 @@ class NotificationSystem {
if (!filtered) { if (!filtered) {
let nextUrl = `/${data.id}`; let nextUrl = `/${data.id}`;
nextBtn.setAttribute('href', nextUrl); const path = window.location.pathname;
nextBtn.style.color = ''; // Remove #ccc const contextMatch = path.match(/^(.*\/)\d+\/?$/);
if (contextMatch && contextMatch[1] !== '/') {
nextUrl = `${contextMatch[1]}${data.id}`;
}
document.querySelectorAll('.nav-next').forEach(btn => { // Update main #prev arrow
prevBtn.setAttribute('href', nextUrl);
prevBtn.style.color = ''; // Remove #ccc
// Update .nav-prev text links and icons
document.querySelectorAll('.nav-prev').forEach(btn => {
btn.setAttribute('href', nextUrl); btn.setAttribute('href', nextUrl);
btn.style.visibility = 'visible'; btn.style.visibility = 'visible';
}); });