The only way to archive tis would be removing the javascript that scrolls the page
I actually did this in a relatively simple way, by removing the function loadGotoAnchor. If there is NO occurrence of '/find/lasptost/' or NO occurrence of '/find/unread/' in the current document.location.href URL, I do NOT call the loadGotoAnchor original function, so the page is just rendered normally, without any scrolling down to the first post TD element. However, if there is '/lastpost/' or '/unread/' in the URL, then I call the original function, which scrolls as we are accustomed.
If anyone is interested, I can post this segment here, some 10 lines of javascript code in DEFAULT.ASPX, plus one ID added to the first TABLE element in POSTS.ASCX as a marker, so only the POSTS page will be treated and not other YAF pages. I know it is an ugly hack, but it works like a charm with no or absolutely minimal overhead).
(This is for the DNN Module only, I suspect it works similarly in other scenarios).
EDIT: besides '/find/lastpost/' and '/find/unread/' there is also the case of '/m/' which scrolls to the given message number.
Edited by moderator
7 years ago
|
Reason: Not specified