STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
190589
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2059 · P4118

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/61701306?noj=FRM61701306-24DO" width="1" height="1"></div>

Nick
Mail
Title
Required text body length: 2 characters. Maximum: 15000 characters.
A file is optional.

Age: 905.53d   Health: 83%   Posters: 4   Posts: 6   Replies: 4   Files: 0

>>Horsie  2sep2015(we)11:47  No.23077  OP  P1
Reply to highlighter

Something I hate about swfchan threads is reading a post and having to remember and find the replied post numbers to understand who and what are the post replying to. I know you can click the link itself, but I don't like it because then I lose the post I'm currently reading, and if the replied post is near the bottom, I just does not work.

It would be nice if upon hovering your cursor over the post number link, the post in question got highlighted.

That's why I have coded what is needed for it to work.
If you want to see what it looks like, I prepared an offline test you can download, unpack and open with your browser of choice to see how it looks. It's the Patreon thread with my code inserted and cleaned of code that wasn't needed for this test so it works offline.
http://www57.zippyshare.com/v/51wMkNtJ/file.html

This is the code and how I implemented it on the download:

On all post number links inside the posts, I added this to the element (post is highlighted only while hovering the post link - TEST1 in the zip file):
onmouseover="highlight(this)" onmouseout="highlight(false)"
or this: (post is highlighted until another post link is hovered upon - TEST2 in the zip file)
onmouseover="highlight(this)"

And added this piece of JavaScript to the start of the page:

<script type="text/javascript"> //Reply to highlighter by Horsie
var highlightedpost = false;
function highlight(post) {
if (highlightedpost !== false) {
highlightedpost.style.background = "";
}
if (post !== false) {
highlightedpost = document.getElementById("p" + post.href.slice(post.href.indexOf("#")+1));
highlightedpost.style.background = "yellow";
}
}
</script>

I'm sure this will need some tweaking and testing to be put on the actual swfchan site, but I hope the admin takes a look at it.

P.S.: I would have added some cool CSS transforms to it, but I'm lazy.

>>!///SWFAnts  #ADMIN#  2sep2015(we)15:17  No.23081  SWF  P2R1
In the beginning the board actually had post highlightning (not on hover but when you clicked a quote link) but something broke with the JavaScript and I haven't really figured out what it was. When it broke the board didn't have many posts, something like one per month maybe, so I didn't bother to dig into the problem. I've actually started work on a new system for the board in the background, which will have more modern imageboard stuff and better moderation tools. It's on hold right now though. In the meantime I'll see if I can enable the old highlight stuff again.
>>!///SWFAnts  #ADMIN#  2sep2015(we)16:30  No.23083  SWF  P3
>>23081
Done.
>>Horsie  3sep2015(th)11:28  No.23112  B  P4R2
>>23083
Thank you.

By the way, I have looked at your code, and... holy shit, this thing is huge! When I did my little function, I didn't even open global.js.
One last thing: I spotted an error on this file (don't be mad at me). Search for "0;" (including quotes) and you'll spot it.

>>!///SWFAnts  #ADMIN#  3sep2015(th)15:20  No.23124  SWF  P5R3
>>23112
Corrected, initially had the variable as a number and must have spaced out when I turned it into a string since I forgot to place ; correctly. Thanks for spotting it for me.

Yeah global.js has gotten quite big over the years. Some of the functions aren't even utilized any longer. It is used by all three top domains but funny thing is that it still doesn't have all of the site's scripts, there are other js files imported on some pages or local script blocks. Same with the stylesheet.

>>Anonymous  3sep2015(th)20:12  No.23138  C  P6R4
>>23077
You can click the reply number and then click back on your browser, it would take you back to the number you clicked on earlier (e.g. the first post you looked at). Works fine for me.



http://swfchan.org/7718/index.shtml
Created: 2/9 -2015 11:47:05 Last modified: 24/2 -2018 00:35:09 Server time: 24/02 -2018 01:00:11