In Reply to: RE: Mark as Read not working? posted by The Killer Piglet on February 26, 2025 at 19:50:14:
//you can paste into Chrome console and try it, have to be in Thread View
//it's meant as a drop-in replacement for current function, no need to re-do anything else, within aa.js file
//once I save here it will lose all the formatting, you can paste into https://beautifier.io/ linked below
function confirmRead(ReadForum, ReadThread)
{
if (userID)
{
if (userID != null)
{
if (confirm("Are you sure you want to mark toggle - test " + ReadThread + " as read/unread?"))
{
var anchorElement = document.querySelector('a[href*="' + ReadThread + '.html"]');
var nearestLiParent = anchorElement.parentNode.closest('li');
toggleElement = nearestLiParent;
toggleElement.classList.add('aa-d');
var nextSib = nearestLiParent.nextElementSibling;
if (anchorElement)
{
var count = 0;
var ulChildren;
var children = nearestLiParent.nextElementSibling.querySelectorAll('*');
children = nextSib.querySelectorAll('li');
for (let i = 0; i < children.length; i++)
{
var toggleElement = children[i];
toggleElement.classList.add('aa-d');
}
}
}
}
else
{
alert("You must log in to Mark Threads as read.")
}
}
else
{
alert("You must log in to Mark Threads as read.")
}
}
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- OK, these seems happier - The Killer Piglet 10:17:01 02/27/25 (4)
- RE: OK, these seems happier - Rod M 12:55:25 02/27/25 (3)
- to clarify, pasting the code into console won't do anything directly. - The Killer Piglet 06:10:26 02/28/25 (0)
- I see the old function is till aa.js - The Killer Piglet 13:48:41 02/27/25 (0)
- RE: OK, these seems happier - The Killer Piglet 13:39:37 02/27/25 (0)