AmberCutie's Forum
An adult community for cam models and members to discuss all the things!

MFC Chat Box Scroll Fix

  • ** WARNING - ACF CONTAINS ADULT CONTENT **
    Only persons aged 18 or over may read or post to the forums, without regard to whether an adult actually owns the registration or parental/guardian permission. AmberCutie's Forum (ACF) is for use by adults only and contains adult content. By continuing to use this site you are confirming that you are at least 18 years of age.
Status
Not open for further replies.

Kradek

V.I.P. AmberLander
Feb 3, 2012
644
1,137
193
Twitter Username
@kradekmfc
MFC Username
Kradek
So I'm on a bit of a script writing tear. You may have experienced a weird glitch with the chat box in MFC chat rooms where it mysteriously scrolls up periodically (most often, for me, after the model has changed the topic. This script fixes that behavior (ie. it keeps the chat box scrolled to the bottom). I've tested it in the latest version of Chrome and it appears to be working, I expect it will work as well in the latest version of Firefox. Safari and IE could *possibly* use it, but that would require downloading an additional add-on. You can find it here.

I should be able to fix this for the model broadcaster pretty easily as well, I just need someone to look up what the ID is of the chatbox for your broadcaster (only the web based version). To find out what that ID is (in Chrome) right click in the chat box and select Inspect Element. That will bring up a box at the bottom of the browser. What you're looking for is something that looks like this:
ChromeInspectElementExample.png

If the last element is div#chat_contents, then you're already good to go. If it's something else, then I need to modify the script to use whatever the ID is (the bit after the #).

Finally, if you're hesitant to install the script, that's completely understandable and exactly the kind of caution you *should* be taking. As before, however, this script does nothing malicious, the source is available on the site linked above, and I encourage you to inspect it yourself or have a knowledgeable technical friend take a look to alleviate any concerns.
 
That is pretty cool, You should send a email to MFC support detailing the bug what causes it and how it can be fixed on their side.

Then demand free tokens. :)
 
Fabulous! Does it also fix the opposite "bug?" The one where you want to scroll up and look at older posts in chat but in a busy room whenever someone posts something, it whizzes you back to the bottom before you can read anything. :)
 
Nordling said:
Fabulous! Does it also fix the opposite "bug?" The one where you want to scroll up and look at older posts in chat but in a busy room whenever someone posts something, it whizzes you back to the bottom before you can read anything. :)
No, but I could possibly modify the script so that it wouldn't move the scroll bar to the bottom if you were holding the mouse button or something like that.
 
Kradek said:
Nordling said:
Fabulous! Does it also fix the opposite "bug?" The one where you want to scroll up and look at older posts in chat but in a busy room whenever someone posts something, it whizzes you back to the bottom before you can read anything. :)
No, but I could possibly modify the script so that it wouldn't move the scroll bar to the bottom if you were holding the mouse button or something like that.
That would be great! Seriously, I must have ADD or something...lol... I forget what has been said and constantly am scrolling back. :)
 
Nordling said:
That would be great! Seriously, I must have ADD or something...lol... I forget what has been said and constantly am scrolling back. :)
After some experimentation this is slightly more difficult than I expected, but I have some ideas that I'll take a look at over the next couple days.
 
Kradek said:
Nordling said:
Fabulous! Does it also fix the opposite "bug?" The one where you want to scroll up and look at older posts in chat but in a busy room whenever someone posts something, it whizzes you back to the bottom before you can read anything. :)
No, but I could possibly modify the script so that it wouldn't move the scroll bar to the bottom if you were holding the mouse button or something like that.

I've did this once when I wrote my own ajax chat room a few years ago for a web project. It didn't revolve around the mouse clicking but more-so the scroll bar location. If I recall correctly each time a new post was added it would first check the position of your scroll bar. Then if the scroll bar was all the way at the bottom then it would add the text and reposition the scroll bar keeping you at the bottom.

I struggled a little bit with messages that spanned multiple lines because moving after the scroll bar was moved it wasn't at the very end. I don't recall If I ever resolved it or not.
 
Surely the easiest method would be to include a checkbox near the bottom of the text area, or just underneath it.

Check it if you wish to enable the "keep scroll bar to bottom of text area", whilst de-checking it would prevent this function (i.e. allow the text to be added to the bottom whilst maintaining the same line.


Therefore, you keep the box checked most of the time. Want to read back? Uncheck the box, scroll to hearts content. Recheck the box to then re-enable the scroll bar to be keep you at the bottom.

How feasible? Dunno, but can't imagine it's all that tough (certainly from the MFC perspective).
 
I might be mistaken, but am I wrong to be worried that you are able to access: my data on all websites by installing this script? Isn't there a less intrusive solution?

from support.google.com
Medium Alert:
Your data on all websites
This item can read every page that you visit -- your bank, your web email, your Facebook page, and so on. Often, this kind of item needs to see all pages so that it can perform a limited task such as looking for RSS feeds that you might want to subscribe to.

Caution: Besides seeing all your pages, this item could use your credentials (cookies ) to request or modify your data from websites.
 
BootyEyes said:
I might be mistaken, but am I wrong to be worried that you are able to access: my data on all websites by installing this script? Isn't there a less intrusive solution?

from support.google.com
Medium Alert:
Your data on all websites
This item can read every page that you visit -- your bank, your web email, your Facebook page, and so on. Often, this kind of item needs to see all pages so that it can perform a limited task such as looking for RSS feeds that you might want to subscribe to.

Caution: Besides seeing all your pages, this item could use your credentials (cookies ) to request or modify your data from websites.
You definitely should be worried about blindly installing scripts, in the same way you should be worried about installing addons to your browser or any program you install on your computer. It comes down to trust and reputation. As I value my reputation, I wouldn't do anything to harm you or steal from you.

That said, as I mentioned in the original post, the source for this script is available right here. Take a look, have a technical friend take a look. To help you out, if I actually were attempting to steal your information, you would be looking for parts of the script that are sending information to some other server. Specifically, with respect to scripts like this one, you want to look for references to XMLHttpRequest or GM_XMLHttpRequest. Those are used to get/receive information.

Bottom line though, if you don't trust me, and don't have the technical background to understand the script or someone to check the script for you, don't install it.
 
Found a little bit of time tonight and uploaded a new version. This fixes a couple of inconsistency bugs I noticed and also adds a pause button so that you can stop the chat from scrolling automatically (when you want to review previous messages for example).

Pause button shown here:
ChatBoxFixPauseBtnExample.png


I'm thinking I may just roll this fix script into the MFC Assistant script, but haven't completely decided yet.
 
these little updates are right in MFC's Dark, Dark Alley. I agree with the bloke that said you should tell MFC and then demand tokens for your work lol

I've gotten use to all it's errors and ways though, and well, some things keep the stereotype away if I do or don't do something.

But good work nonetheless. Just don't hack into me stuff...if you're the type that does that, idk.
 
Kradek said:
Found a little bit of time tonight and uploaded a new version. This fixes a couple of inconsistency bugs I noticed and also adds a pause button so that you can stop the chat from scrolling automatically (when you want to review previous messages for example).

Pause button shown here:
ChatBoxFixPauseBtnExample.png


I'm thinking I may just roll this fix script into the MFC Assistant script, but haven't completely decided yet.
Just checked out the new version and it does do what it says it does. :) However, there seems to be an odd side effect--generally when entering an MFC chat room, remnants of conversation prior to you entering remain, with this script installed, that old text flashed briefly, and you see no text until people post new stuff. Not sure if that's a good thing, since being able to see the old text allows one to scroll up and get a feel for what the conversation is about before posting.
 
Nordling said:
Kradek said:
Found a little bit of time tonight and uploaded a new version. This fixes a couple of inconsistency bugs I noticed and also adds a pause button so that you can stop the chat from scrolling automatically (when you want to review previous messages for example).

Pause button shown here:
ChatBoxFixPauseBtnExample.png


I'm thinking I may just roll this fix script into the MFC Assistant script, but haven't completely decided yet.
Just checked out the new version and it does do what it says it does. :) However, there seems to be an odd side effect--generally when entering an MFC chat room, remnants of conversation prior to you entering remain, with this script installed, that old text flashed briefly, and you see no text until people post new stuff. Not sure if that's a good thing, since being able to see the old text allows one to scroll up and get a feel for what the conversation is about before posting.
Are you using Chrome? I noticed a bug in Chrome where the first time you enter any room the remnants you are talking about are not displayed. If you then move to another room (via next model or by clicking on a new model) they display properly. This didn't happen for me in FF. I haven't had a chance to track it down yet, but I will.
 
Kradek said:
Nordling said:
Kradek said:
Found a little bit of time tonight and uploaded a new version. This fixes a couple of inconsistency bugs I noticed and also adds a pause button so that you can stop the chat from scrolling automatically (when you want to review previous messages for example).

Pause button shown here:
ChatBoxFixPauseBtnExample.png


I'm thinking I may just roll this fix script into the MFC Assistant script, but haven't completely decided yet.
Just checked out the new version and it does do what it says it does. :) However, there seems to be an odd side effect--generally when entering an MFC chat room, remnants of conversation prior to you entering remain, with this script installed, that old text flashed briefly, and you see no text until people post new stuff. Not sure if that's a good thing, since being able to see the old text allows one to scroll up and get a feel for what the conversation is about before posting.
Are you using Chrome? I noticed a bug in Chrome where the first time you enter any room the remnants you are talking about are not displayed. If you then move to another room (via next model or by clicking on a new model) they display properly. This didn't happen for me in FF. I haven't had a chance to track it down yet, but I will.
Yups! I haven't figured out yet how to load the script into FF or Safari.
 
It appears that the update to the MFC client the day before yesterday actually fixed the bug this script was compensating for. When you scroll up in the chat box, the scroll bar stays at the position you left it. If you leave the scroll bar at the bottom, the chat box is now scrolling normally without the odd jumps.

If this is everyone else's experience as well (I've really only been using Chrome since the update), I'll probably retire this script.
 
Status
Not open for further replies.