GreaseMonkey'ing Cantr - customizing Cantr, clientside

General out-of-character discussion among players of Cantr II.

Moderators: Public Relations Department, Players Department

AlchemicRaker
Posts: 311
Joined: Thu Feb 05, 2009 4:56 am

GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby AlchemicRaker » Sat Dec 19, 2009 5:37 am

This "userscript" changes the styling of events in Cantr, like so:
Image
Non-chat is darkened, and emotes are tinted and italicized.

For people who what to customize more, I have it mark the entire event, character's names, "quoted" parts of events, and *emoted* parts of events. On top of this, Cantr already marks types of events (you could detect if it was a character talking, or a radio for instance) so there's lots of possibilities.

To use this you'll need either TamperMonkey(Chrome), GreaseMonkey(FireFox), or the equivalent for your browser.

Now get one of the versions of CVEE (this extension/userscript):

Basic Edition - This should work right away, like shown in the image above.
Advanced Edition - There's some instructions on the page to get you started (and the CSS to make it work like the Basic version) so you can make your own styles.
Last edited by AlchemicRaker on Sun Jan 17, 2010 4:06 am, edited 1 time in total.
Snake_byte
Posts: 2134
Joined: Wed Apr 14, 2004 7:12 am
Location: Quebec, Canada

Postby Snake_byte » Sat Dec 19, 2009 5:38 am

Looks good! :)
Image
My old banner ;)
User avatar
joo
Posts: 5021
Joined: Fri Jun 17, 2005 2:26 pm
Location: London, UK

Postby joo » Sat Dec 19, 2009 5:48 am

I have written a few scripts. Here is one for Cantr:

joo wrote:http://joo.freehostia.com/greasemonkey/Cantr.Interface.NotesCheckUncheckAll.user.js

This is a Greasemonkey script I wrote that adds a "Check/uncheck all" control to the multiple note operation screen, which should make it easier when large numbers of notes need to be moved.

That is, until something like this is actually implemented in the game.

http://forum.cantr.org/viewtopic.php?p=375548
User avatar
Litchin_flip
Posts: 309
Joined: Sat Jan 15, 2005 8:40 pm
Location: BFE, Virginia

Postby Litchin_flip » Sat Dec 19, 2009 6:03 am

It seems to work as intended.
SIMMONS--SNOWWIS--hmmm interesting don't you think
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Postby EchoMan » Sat Dec 19, 2009 6:57 am

Nice one. I have used stylish to alter Cantr into a "neutral" black on white looking webpage, as well as some other alterations, like everything is left justified, smaller fonts etc. I use it at work where something green/orange == not working. :)
AlchemicRaker
Posts: 311
Joined: Thu Feb 05, 2009 4:56 am

Postby AlchemicRaker » Sat Dec 19, 2009 7:15 am

I think the next thing I should do is add a back button on all of those pages that don't have back buttons. I don't know where to expect it, so I get a lot of them. A todo for tomorrow, then.

Also, nice script, joo, using it now...
User avatar
Rob Maule
Posts: 441
Joined: Mon Jul 14, 2003 5:15 pm
Location: Florida, USA
Contact:

Postby Rob Maule » Sat Dec 19, 2009 8:25 am

Sweet script, Natso. At first, I didn't think I could get it working in Chrome (just switched to the beta to allow addons). Eventually, I figured it out (I think). I use CantrSpy, which loads the page without the "www". So I just edited your script to include:

Code: Select all

// @include       http://www.cantr.net/index.php?dt=*
// @include       http://www.cantr.net/index.php?s=*
// @include       http://cantr.net/index.php?dt=*
// @include       http://cantr.net/index.php?s=*
AlchemicRaker
Posts: 311
Joined: Thu Feb 05, 2009 4:56 am

Postby AlchemicRaker » Sat Dec 19, 2009 8:33 am

Rob Maule wrote:Sweet script, Natso. At first, I didn't think I could get it working in Chrome (just switched to the beta to allow addons). Eventually, I figured it out (I think). I use CantrSpy, which loads the page without the "www". So I just edited your script to include:

Code: Select all

// @include       http://www.cantr.net/index.php?dt=*
// @include       http://www.cantr.net/index.php?s=*
// @include       http://cantr.net/index.php?dt=*
// @include       http://cantr.net/index.php?s=*


Oh cool, I'll have to check out this CantrSpy. Also, I've gone and revised my uploaded script, so future people should not have this problem. (No need for you to update though, I did exactly what you did :D )

Cheers
- Natso
User avatar
Genevieve
Posts: 2114
Joined: Mon Jul 14, 2003 5:31 pm
Location: Palm Springs, CA
Contact:

Postby Genevieve » Sat Dec 19, 2009 2:52 pm

Will this work in Firefox as well as IE?
AlchemicRaker
Posts: 311
Joined: Thu Feb 05, 2009 4:56 am

Postby AlchemicRaker » Sat Dec 19, 2009 3:26 pm

Genevieve wrote:Will this work in Firefox as well as IE?

I created this in firefox, and I haven't tested this in IE.
User avatar
Kaizerwolf
Posts: 42
Joined: Fri Aug 28, 2009 10:00 pm

Postby Kaizerwolf » Sat Dec 19, 2009 3:49 pm

That looks pretty slick man!
User avatar
Rob Maule
Posts: 441
Joined: Mon Jul 14, 2003 5:15 pm
Location: Florida, USA
Contact:

Postby Rob Maule » Sat Dec 19, 2009 3:54 pm

Genevieve wrote:Will this work in Firefox as well as IE?

For Internet Explorer, I think you'll need either Trixie or GM4IE first. I believe you'll also need to install Greasemonkey for Firefox, as well.
reve
Posts: 159
Joined: Sun Sep 13, 2009 9:31 pm
Location: Poland, Szczecin

Postby reve » Sun Dec 20, 2009 9:26 pm

I thougt that it would be better (for me) if emotes were slightly more different from normal 'clickable' links (ie. bold or different color), but ever time I click on 'Edit' button in Greasmonkey, it gives me blank notepad window and (translated, more less accurate) message:

System cannot find specified path


Any help here?
AlchemicRaker
Posts: 311
Joined: Thu Feb 05, 2009 4:56 am

Postby AlchemicRaker » Sun Dec 20, 2009 9:41 pm

reve wrote:I thougt that it would be better (for me) if emotes were slightly more different from normal 'clickable' links (ie. bold or different color), but ever time I click on 'Edit' button in Greasmonkey, it gives me blank notepad window and (translated, more less accurate) message:

System cannot find specified path


Any help here?

Don't use greasemonkey to edit the script. Goto my download link, right click and save it to your computer. Run notepad and open the script using notepad. It should be fairly easy to find the line to change the formatting... to apply it: save the file, window your browser, then drag & drop the file from the folder into the browser... it should let you install it then.

Cheers
- Natso
User avatar
Cdls
Posts: 4204
Joined: Sat May 14, 2005 7:09 pm

Postby Cdls » Tue Dec 22, 2009 1:09 am

Great script, thanks a lot :)

Return to “General Discussion”

Who is online

Users browsing this forum: Google [Bot] and 1 guest