Chaturbate - Better Modding

Provides a better modding interface for the cam girls site of chaturbate.com. This script makes modding faster and easier. Check out the details.

Author
vlad88
Daily installs
1
Total installs
2,202
Ratings
21 0 0
Version
2.12
Created
Updated
License
GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
Applies to

Author's Description

It currently works only with the old Chaturbate player page, not with the new one that is currently in beta testing.

Tested in Firefox with Greasemonkey and Tampermonkey extensions, Chromium and Google Chrome with Tampermonkey extension, and Pale Moon with Greasemonkey for Pale Moon.

Silencing is done by double-clicking a message. Upon double-clicking, a silence request is sent immediately and a grey outline is displayed around the message.

When you are not a moderator, an alert message will show saying that a silence request has failed.

A pretty good simulation mode is included, so you can try modding even when you are not a moderator. To enable the simulation mode, click on the checkbox that is at the very bottom of the web page and is labeled "Simulation mode". This script saves all of its preferences in cookies, so that check box will remain checked until you click it again.

To prevent you from silencing somebody accidentally, the script will not allow you to silence anybody if the chat box is currently scrolled all the way down, as then it might scroll down at any time, when a new message arrives.

So, you need to scroll the box a little bit up before you can silence anybody. But the script makes it easy. Just press SPACE on your keyboard. Of course, if a text field or a button has keyboard focus, click on an empty area of the web page first. The pressing of the SPACE scrolls the chat box up, off the bottom, by 5 pixels, thus disabling the automatic scrolling. When there is no scroll bar, you of course do not have to wait for it to appear. Then, after perhaps silencing somebody, you can press SPACE again. Pressing it again just scrolls the chat box back to the very bottom. Note that all buttons and checkboxes that are added to the page by this script get rid of the keyboard focus whenever clicked, so pressing SPACE after you click them will not trigger their action.

This script changes the way of how silencing and banning is presented to just this script's users. The messages of silenced or banned users just are not deleted, they are marked with a light grey backround color instead. When the chat box is currently scrolled off the bottom, then this is necessary, just to prevent the messages from moving when you are about to double-click one. When you stop mouse pointer over such a message, then a tooltip will appear, saying who silenced him or her. When you click it, the message is collapsed. You will be able to easily distinguish messages of users that were banned by the room's owner, because a dark grey outline is displayed around them.

The messages of silenced or banned users are automatically collapsed by default. If the users are silenced or banned when the chat box is not scrolled all the way down, then their messages are collapsed just when it becomes scrolled all the way down. A collapsed message's content is not visible and the height of it is 10 pixels. The background color of it remains light grey. When you stop mouse pointer over it, then a tooltip will appear, saying who wrote that message and who silenced him or her. When you click it, the message is expanded, so you can read it.

The script adds a button to near the right-upper corner of the chat box. When that button's text is the plus (+) character, then messages are being automatically collapsed. When the text of it is the minus (-) character, then messages are not being collapsed. When you click it, the state is toggled and all messages in the chat box are expanded or collapsed. When you click it with Shift key down, then all messages are expanded or collapsed, but the state of the button and therefore the corresponding preference are not toggled.

This script has a feature that only the room's owner can utilize. It allows for banning. It is done by double-clicking a message with Ctrl key down. You can try it even if you are not a broadcaster, in that Simulation mode.

Maybe you did not notice that, but there are never more than 200 messages in Chaturbate's chat boxes. Because when there are 200 messages and a new message arrives, then the oldest message is deleted. When the oldest message is deleted and the chat box is not scrolled all the way down, then the script will try to ensure that the displayed messages will not move. However, some messages might still scroll by up to 2 pixels.

The script adds another button to near the right-upper corner of the chat box. The button is a counter of messages, meaning that the text in it is always the current number of messages in the chat box. When the number reaches 200, then the text in that button becomes red. When you click that button at any time, then all messages except the last page are deleted from your chat box. When you click it with Shift key down, then all except the last 4 messages are deleted.

Note that this script also removes the confirmation dialog box that appears when trying to silence somebody using the standard Chaturbate's modding interface that consists of that contextual menu that appears when clicking on a username. So be careful when using that contextual menu in rooms where you are a moderator.

Note that when you are a moderator and you silence another moderator or the broadcaster, then Chaturbate will only delete his or her messages, it will not actually silence him or her. I am not sure whether or not it is the same when you are a broadcaster. But, granting moderator privileges to somebody who was silenced before that does not do the job of unsilencing him or her.

When you happen to silence somebody accidentally, the room's owner can fix it by clicking the "Clear All Banned IPs" link at the right-most Gear tab of the chat box.

Note that despite the name of that link, Chaturbate actually does not ban IPs. It bans only user accounts. It is important that Chaturbate tries to link each of your accounts to your other accounts. It does so by using so-called flash cookies. So, when you are banned, there is no need to change your IP adress. You just need to clear not only your browser cookies from chaturbate.com, but also your flash cookies (google it up if you do not know what it is or how to clear it). Then you can safely create a new account. Later, if you log in to a banned account again, you again have to clear your cookies and flash cookies, before you can safely log in back into your non-banned account. I tested that it really works this way on July 24, 2013. I tested it only with a whole account ban, but with room-specific silences and bans it is very likely the same. In the source code of every Chaturbate's web page, there is a JavaScript function called link_accounts, it does this job of linking your current account to other accounts. By saying "your current account", I meant the account that you are currently logged in to. An account can be linked to any other account only if you are currently logged in to that account. If your account is linked to a banned account, it is getting banned too, immediately (well, you will see that the very next page load; typically, when you log in, you will see "Account Banned" after the very next click, in the case of whole account ban). Why Chaturbate does not ban IPs? Because behind a single IP can be a whole company, school, or family. I tested it with an account that was probably banned just because I created this script. I made it easy for them, because I was saying here what my Chaturbate account name was. When your whole account is banned, you can do nothing on Chaturbate while logged in, you cannot even log out (can be done by deleting your cookies). You cannot access your list of followed models, and you cannot access even photo sets that you may have bought. I have managed to recover my list of followed models from Firefox's disk cache though. Warning: if you are going to recover something from Firefox's cache, first make sure that the File > Work Offline menu item is checked, or you will delete it permanently instead of recovering it. Firefox's cache can be accessed via about:cache URL.

Enjoy it.

Version history:

1.5 bugfix: The Chaturbate's "Silence {username}?" confirmation dialog box was not removed in non-English localizations of Chaturbate.
1.6 bugfix: The "Simulation mode" checkbox was not getting rid of keyboard focus whenever clicked.
2.0 lots of improvements: The chat box can no more scroll down suddenly (except when there is no scrollbar yet). Messages of silenced or banned users are not deleted from chat boxes of just this script's users, so they will not just disappear (they can be collapsed or not, depending on a user's preference). Shortened those messages that are presented to users of just this script when a user is silenced or banned. This script ensures that messages almost (that is, sufficiently enough) do not move even if the number of messages is at the limit of 200, when the chat box is not scrolled all the way down; so the user is no longer required to delete messages manually to be allowed to continue modding. Preferences are being saved in cookies. Broadcasters can use this script to ban too. More robust placing of the buttons (one button added).
2.1 fixed 2 bugs: It was not possible to ban already silenced user. Removed a debugging alert message that was appearing when silencing a user that tipped.
2.2 one improvement and one possible bugfix: The improvement: No more running on embedded ads' pages, thus making page loads a little bit faster. The bugfix: Removed a possible bug in the feature of kicking users by the broadcaster (not tested as I do not broadcast).
2.3 compatibility with Google Chrome with the Tampermonkey extension (fixed a fatal bug: usage of unsupported string methods "startsWith" and "endsWith")
2.4 now broadcasters can use this script too (just fixed a bug that was preventing it from working)
2.5 updated the list of included pages, as chaturbate.com has switched from http to https protocol. Script migrated from userscripts.org to greasyfork.org, as userscripts.org went down.
2.6 changed the name of the script from ChaturbateBetterModding to "Chaturbate - Better Modding"
2.7 fixed after a change of Chaturbate website broke the collapsing of messages of silenced or banned users
2.8 fixed after a change of Chaturbate website broke the customisation of the handling of received messages
2.9 fixed after some changes of Chaturbate website; it still does not work with "new Chaturbate player page (beta)"
2.10 fixed to work with Tampermonkey extension after the previous version was tested only in Firefox with Greasemonkey extension
2.11 fixed that it did not work after some random page loads in Chrome with Tampermonkey; fixed that it was probably causing Pale Moon browser to freeze shortly after page load
2.12 fixed to work in Firefox with Greasemonkey extension after the previous version broke it