In Reply to: RE: Mark as Read not working? posted by Rod M on February 26, 2025 at 10:12:46:
Well, I am a fool, I expected mark read to turn all the hyperlinks red, but what it does is change the little arrow!In that case this should get there, more or less.
I don't have a way to step through the code so had to hammer in consoleThe business end is this, you can type in browser console and add/remove the classes
anchorElement = document.querySelector('a[href*="185726.html"]');
nearestLiParent = anchorElement.closest('li');
nearestLiParent.classList.add("aa-d"); // or nearestLiParent.classList.remove("aa-d");full function:
function confirmRead(ReadForum, ReadThread) {
if (userID) {
if (userID != null) {
if (confirm("Are you sure you want to mark thread - test " + ReadThread + " as read?")) {//we dont have id's in elemetns so have to get creative
anchorElement = document.querySelector('a[href*="' + ReadThread + '.html"]');
nearestLiParent = anchorElement.closest('li'); // this grabs the parentnearestLiParent.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.")
}
}
Edits: 02/26/25
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- RE: Mark as Read not working? - The Killer Piglet 13:06:47 02/26/25 (8)
- RE: Mark as Read not working? - Rod M 19:28:18 02/26/25 (6)
- RE: Mark as Read not working? - The Killer Piglet 19:50:14 02/26/25 (5)
- 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)
- you may want to get rid of the 'must me logged in' check - The Killer Piglet 13:09:05 02/26/25 (0)