Conquer Club

GM Script: Watch this game - Version 1.4.4

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

GM Script: Watch this game - Version 1.4.4

Postby Dako on Wed Sep 30, 2009 6:53 pm

Need to know what's happening in other games you are not playing? Looking after tournament or friend's game? Too tired to bookmark dozens of games you like to watch?

Here it comes, script that allows you to mark certain games you like and see them in additional tab on the main screen!

Link - http://userscripts.org/scripts/show/58929
Link2 http://www.webextender.net/scripts/show/58929.html
Script works in Firefox and Google Chrome.

User Guide
Watch This Game User Guide

TODO:
  • Check if it is possible to integrate with chat sniffer
  • Go to next "watched" game
  • Sort by game state option

Version 1.4.4
  • Fixed - "watch"/"unwatch" links stopped working after recent site update - thanks to dgz345 for the fix
  • Added - support of Polymorphic games
  • Added - support of Zombie spoils
  • Added - support of Parachute forts and No forts
  • Added - support of Trench Warfare
  • Added - support of Round Limits


show: Version History


Features (with screenshots):
  • New tab on 'My games' page - Image
  • Links to watch or unwatch certain games (from list of games and from game page itself)
  • Started and waiting for players games both can be marked for watching

Known problems (aka roadmap):
  1. Some CC related bugs that cannot be fixed because they depend on CC API

Fully compatible with BOB.

All started when lack rejected this idea as site improvement.
Made it to myself and I am no expert in JavaScript by all means so code might be poor in some places.

Cheers,
Dako.
Last edited by dgz345 on Thu Aug 07, 2014 4:23 pm, edited 23 times in total.
Reason: Made it sticky
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Lindax on Wed Sep 30, 2009 8:41 pm

Oh man, this is great! Hail Dako!

Now I can find certain key tournament games with having to go through "find a game"!

You're my hero :shock:

Lx
"Winning Solves Everything" - Graeko
User avatar
Colonel Lindax
Tournament Director
Tournament Director
 
Posts: 11035
Joined: Sun Jan 20, 2008 12:58 pm
Location: Paradise Rediscovered

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Foxglove on Thu Oct 01, 2009 2:26 pm

I like it! Very nice. :D
Brigadier Foxglove
 
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Dako on Thu Oct 01, 2009 3:57 pm

Lindax wrote:Oh man, this is great! Hail Dako!

Now I can find certain key tournament games with having to go through "find a game"!

You're my hero :shock:

Lx


Great you liked it and that it is actually handy for tournaments and clan league games.

Foxglove wrote:I like it! Very nice. :D

Thanks :).
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby saraith on Fri Oct 02, 2009 4:31 am

Dako wrote:Features (with screenshots):
  • New tab on 'My games' page - Image
  • Links to watch or unwatch certain games (from list of games and from game page itself)
  • Started and waiting for players games both can be marked for watching


you couldn't show a game shot for a foggy game that I'm in? ;)

J/K Dako, nice script... I think I'll find this quite useful. :)
To achieve balance, first you must grow.
To grow, first you must learn.
To learn, first you must listen.
To listen, first you must shut the hell up.
-Buddhist saying
User avatar
Corporal 1st Class saraith
 
Posts: 476
Joined: Tue Aug 12, 2008 4:13 am
Location: Cow-Town

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Dako on Fri Oct 02, 2009 4:48 am

It's not foggy but that would be fun :D.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby chipv on Sun Oct 11, 2009 6:40 am

Excellent script!

You can use the <time_remaining> tag to sort by remaining round time, btw.
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2816
Joined: Mon Apr 28, 2008 5:30 pm

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Foxglove on Sun Oct 11, 2009 10:40 am

So a nice extension idea, if you're interested, would be to allow people to add/name multiple tabs, or to categorize games within the watched tab. For example, I might want a list of games with partner x, and another list of games from tournament y.

Hmmm...actually, that's an entirely different script, but it would reuse a bit of code that you've already written. :) I've previously thought about writing something like that myself, but you've already done the tab/game whatnot work. :D
Brigadier Foxglove
 
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Dako on Sun Oct 11, 2009 3:06 pm

Foxglove wrote:So a nice extension idea, if you're interested, would be to allow people to add/name multiple tabs, or to categorize games within the watched tab. For example, I might want a list of games with partner x, and another list of games from tournament y.

Hmmm...actually, that's an entirely different script, but it would reuse a bit of code that you've already written. :) I've previously thought about writing something like that myself, but you've already done the tab/game whatnot work. :D

Yeah, I'd like to add different tabs (or one dropdown tab) and make it much more powerful - but I will not do it unless I have proper API functions to construct game nodes. Making so many ajax requests is just horrible and will load the browser a lot.

chipv wrote:Excellent script!

You can use the <time_remaining> tag to sort by remaining round time, btw.


Thanks, but it is not easy cause I am working with them as innerHTML and it doesn't allow them to use as DOM objects after that (or I am not that good at js) and sort them as I need it.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby chipv on Sun Oct 11, 2009 3:53 pm

Dako wrote:
chipv wrote:Excellent script!

You can use the <time_remaining> tag to sort by remaining round time, btw.


Thanks, but it is not easy cause I am working with them as innerHTML and it doesn't allow them to use as DOM objects after that (or I am not that good at js) and sort them as I need it.


It is many more times difficult using innerHTML if you don't need to like you said you remove the ability to use a DOM parser - so use an XML DOM parser instead!
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2816
Joined: Mon Apr 28, 2008 5:30 pm

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Foxglove on Mon Oct 12, 2009 11:41 am

Dako wrote:
Foxglove wrote:So a nice extension idea, if you're interested, would be to allow people to add/name multiple tabs, or to categorize games within the watched tab. For example, I might want a list of games with partner x, and another list of games from tournament y.

Hmmm...actually, that's an entirely different script, but it would reuse a bit of code that you've already written. :) I've previously thought about writing something like that myself, but you've already done the tab/game whatnot work. :D

Yeah, I'd like to add different tabs (or one dropdown tab) and make it much more powerful - but I will not do it unless I have proper API functions to construct game nodes. Making so many ajax requests is just horrible and will load the browser a lot.


Yeah, I hear you! I am holding off on ideas until we get an API extension as well, in order to avoid crazy excessive ajax calls.
Brigadier Foxglove
 
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby endar1077 on Fri Oct 16, 2009 1:09 pm

Wow, I'm loving it.

There are a couple of interface things that could be improved, though. My thoughts, in case you are interested:
1) There is no way to "unwatch" games from the "watched" tab. This is a pretty big inconvenience, because it seems that once the game is over, you actually have to copy the game number, go to game finder, search for the game, and THEN click unwatch. It's probably a pretty easy fix to add an "unwatch" button right there in that tab.
2) This is very similar, but there's no way to watch games when given a game number link (i.e. Game 12345677). In a lot of the clan challenges, where this is most useful, there will be a long list of such links. It seems that in order to watch the games, you have to copy each game number individually, go to game finder, search it, and then click watch.

Perhaps the easiest way to fix both of these problems would be to simply add "Watch" and "Unwatch" buttons to the game screens themselves, so you could simply follow the link and then click watch or unwatch. I don't know.

Great script, though. Thank you!
Highest score: Colonel, 2786, #124
Image
Major endar1077
 
Posts: 302
Joined: Sat Feb 09, 2008 6:28 pm
Location: Berkeley, CA

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Dako on Fri Oct 16, 2009 3:26 pm

endar1077 wrote:Wow, I'm loving it.

There are a couple of interface things that could be improved, though. My thoughts, in case you are interested:
1) There is no way to "unwatch" games from the "watched" tab. This is a pretty big inconvenience, because it seems that once the game is over, you actually have to copy the game number, go to game finder, search for the game, and THEN click unwatch. It's probably a pretty easy fix to add an "unwatch" button right there in that tab.
2) This is very similar, but there's no way to watch games when given a game number link (i.e. Game 12345677). In a lot of the clan challenges, where this is most useful, there will be a long list of such links. It seems that in order to watch the games, you have to copy each game number individually, go to game finder, search it, and then click watch.

Perhaps the easiest way to fix both of these problems would be to simply add "Watch" and "Unwatch" buttons to the game screens themselves, so you could simply follow the link and then click watch or unwatch. I don't know.

Great script, though. Thank you!

Yes, I am interested in your thoughts.

1. Known issue (read the first post, yeah :) ), can't fix now. You can get inside the game and click unwatch there (it is available, near the list of players).
2. Same, you can enter the game and click watch/unwatch.

But thanks for your input, when CC API will be improved a bit (and I hope it will be fixed soon) all the small things will be fixed and I will start the 2.0 version (heh, sounds tempting even for me :D).
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby endar1077 on Sun Oct 18, 2009 1:05 pm

Oh wow, I'm so dumb. I searched through all the other posts to make sure nobody else had reported these problems, but I didn't read the freaking "Known Bugs" section in the head post.

:shock:

Yeah, sorry about that. But I'm glad to know about the link inside the game screen - I definitely hadn't seen that (again, the head post).

EDIT: Now I see why I didn't see it. It's in a different place on mine, because I use the large map. The other three (normal) links stack vertically above player names, and then "unwatch" appears at the very bottom of the player names.

SECOND EDIT: Or not - maybe it was just that game. Now it's right where it's supposed to be. Anyway, nevermind all my suggestions, lol. This unwatch button fixes them all. I apologize again for being that dumb guy who didn't read enough to know the answer to his question. ;-)
Highest score: Colonel, 2786, #124
Image
Major endar1077
 
Posts: 302
Joined: Sat Feb 09, 2008 6:28 pm
Location: Berkeley, CA

Re: New Greasemonkey Script: Conquer Club - Watch this game

Postby Dako on Sun Oct 18, 2009 3:17 pm

It's ok, no problem :).

I will look into the code in a few days to see why the link is jumping on a few maps. Also, I have a snippet from sherkaner that will add an unwatch link to 'watched' tab. If it will work, that is just great, but I haven't looked into code deep to see if it will work.

Also, I am still waiting for CC API improvement and will fix all the bugs once it is released.

Glad that you liked the script :).
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Dako on Mon Oct 19, 2009 3:30 pm

Updated to 1.1 version, fixed some bugs and added some functionality.

Reinstall link - http://userscripts.org/scripts/source/58929.user.js

Update, version 1.1:
  • Simple color coding for links (so you don't mess them with site actions)
  • Added unwatch to 'watched games' tab (thanks to sherkaner for code snippet)
  • Fixed bug to display watch/unwatch link inside the game below the players
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Calidrmr on Wed Nov 04, 2009 9:13 pm

Dako wrote:Updated to 1.1 version, fixed some bugs and added some functionality.

Reinstall link - http://userscripts.org/scripts/source/58929.user.js

Update, version 1.1:
  • Simple color coding for links (so you don't mess them with site actions)
  • Added unwatch to 'watched games' tab (thanks to sherkaner for code snippet)
  • Fixed bug to display watch/unwatch link inside the game below the players

love this script Dako, thanks!!! :D :D :D

got one problem though, i can't see the "watch" link inside the game, so i have to keep going to game finder to watch a game, but the "unwatch" link is showing up for me. Any help would be grand! Thanks! oh, i have installed 1.1.
Image
<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.
User avatar
Corporal Calidrmr
 
Posts: 641
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby mgconstruction on Thu Nov 05, 2009 9:56 pm

I love this feature! Saves me time on my tourney results.
User avatar
Sergeant 1st Class mgconstruction
 
Posts: 1252
Joined: Fri Jun 29, 2007 8:48 pm

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Dako on Fri Nov 06, 2009 5:15 am

Calidrmr wrote:
Dako wrote:Updated to 1.1 version, fixed some bugs and added some functionality.

Reinstall link - http://userscripts.org/scripts/source/58929.user.js

Update, version 1.1:
  • Simple color coding for links (so you don't mess them with site actions)
  • Added unwatch to 'watched games' tab (thanks to sherkaner for code snippet)
  • Fixed bug to display watch/unwatch link inside the game below the players

love this script Dako, thanks!!! :D :D :D

got one problem though, i can't see the "watch" link inside the game, so i have to keep going to game finder to watch a game, but the "unwatch" link is showing up for me. Any help would be grand! Thanks! oh, i have installed 1.1.


Tell me the game you can't find a link - I will look into it. Also, would be handy to provide screenshot with what you see. Watch link should be near players list.

I love this feature! Saves me time on my tourney results.

Glad to hear it!
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Calidrmr on Fri Nov 06, 2009 6:29 am

sorry about that...don't you know i expected you to just know what i was talking about? lol...i got to this game by a link from our forum and this is what i see when i click the link:
Click image to enlarge.
image


i am already watching this game & can see the "unwatch" when i enter from my "Watched" tab, but when i first wanted to add it, the links were not there, like the pic above:
Click image to enlarge.
image


this happened with all the games i wanted to watch, not just one. If you need screenshots of a game i haven't started watching, let me know & i'll get you one as soon as i have one i need to watch but haven't grabbed from Game Finder yet. Thanks for your help!
Image
<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.
User avatar
Corporal Calidrmr
 
Posts: 641
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Dako on Fri Nov 06, 2009 6:41 am

Strange, I do see that link myself.

Ok, do you have any errors displayed in the status bar after you entered the page? Also, if you don't have them - can you send me full source code of the game page you are not watching and don't see 'watch' link? Source can be obtained by 'ctrl+u' hotkeys, you can upload it somewhere as a file or send me on email icanworkfast@gmail.com

Cheers.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Calidrmr on Fri Nov 06, 2009 9:49 pm

Thanks, Dako, i have sent you the code.
Image
<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.
User avatar
Corporal Calidrmr
 
Posts: 641
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Dako on Sun Nov 08, 2009 8:11 am

Hmmm, that is a very strange behavior, somehow GreaseMonkey is not able to add a style for this page and stops executing.

For now I'd like you to try 2 things:

1. Check your greasemonkey version and update it if it is not latest.
2. Disable all other scripts and see how it works alone.

If both actions didn't help you - just reinstall the script, I changed few lines there so now it will always work :).
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Calidrmr on Sat Nov 14, 2009 6:30 pm

thanks, Dako, but it appears it is something with BOB. My Greasemonkey is the latest, i disabled all my addons & it worked, then i enabled them all one by one, they all worked with it, except BOB. So I tried reinstalling the script, and that didn't help either.

<edit> I fixed it!!! I messed around with my BOB options, turns out the "Watch Game" link will not show up if you don't have the "Jump to map" option on in BOB! sorry for all the trouble!
Image
<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.
User avatar
Corporal Calidrmr
 
Posts: 641
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...

Re: GM Script: Conquer Club - Watch this game - UPDATED v. 1.1

Postby Dako on Sun Nov 15, 2009 4:41 pm

Thanks for the notice, I will try to look into that as well and see why that happened.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Next

Return to Tool Archives

Who is online

Users browsing this forum: No registered users

cron