Page 1 of 19

GM Script: Watch this game - Version 1.4.4

PostPosted: Wed Sep 30, 2009 6:53 pm
by Dako
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.

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

PostPosted: Wed Sep 30, 2009 8:41 pm
by Lindax
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

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

PostPosted: Thu Oct 01, 2009 2:26 pm
by Foxglove
I like it! Very nice. :D

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

PostPosted: Thu Oct 01, 2009 3:57 pm
by Dako
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 :).

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

PostPosted: Fri Oct 02, 2009 4:31 am
by saraith
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. :)

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

PostPosted: Fri Oct 02, 2009 4:48 am
by Dako
It's not foggy but that would be fun :D.

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

PostPosted: Sun Oct 11, 2009 6:40 am
by chipv
Excellent script!

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

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

PostPosted: Sun Oct 11, 2009 10:40 am
by Foxglove
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

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

PostPosted: Sun Oct 11, 2009 3:06 pm
by Dako
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.

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

PostPosted: Sun Oct 11, 2009 3:53 pm
by chipv
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!

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

PostPosted: Mon Oct 12, 2009 11:41 am
by Foxglove
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.

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

PostPosted: Fri Oct 16, 2009 1:09 pm
by endar1077
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!

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

PostPosted: Fri Oct 16, 2009 3:26 pm
by Dako
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).

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

PostPosted: Sun Oct 18, 2009 1:05 pm
by endar1077
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. ;-)

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

PostPosted: Sun Oct 18, 2009 3:17 pm
by Dako
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 :).

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

PostPosted: Mon Oct 19, 2009 3:30 pm
by Dako
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

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

PostPosted: Wed Nov 04, 2009 9:13 pm
by Calidrmr
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.

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

PostPosted: Thu Nov 05, 2009 9:56 pm
by mgconstruction
I love this feature! Saves me time on my tourney results.

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

PostPosted: Fri Nov 06, 2009 5:15 am
by Dako
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!

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

PostPosted: Fri Nov 06, 2009 6:29 am
by Calidrmr
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!

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

PostPosted: Fri Nov 06, 2009 6:41 am
by Dako
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.

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

PostPosted: Fri Nov 06, 2009 9:49 pm
by Calidrmr
Thanks, Dako, i have sent you the code.

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

PostPosted: Sun Nov 08, 2009 8:11 am
by Dako
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 :).

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

PostPosted: Sat Nov 14, 2009 6:30 pm
by Calidrmr
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!

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

PostPosted: Sun Nov 15, 2009 4:41 pm
by Dako
Thanks for the notice, I will try to look into that as well and see why that happened.