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.
Post Reply
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

GM Script: Watch this game - Version 1.4.4

Post 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


[spoiler=Version History]
Version 1.4.3
  • Fixed - "watch all player's games" link was not in place
  • Fixed - Now script makes 3 requests to the server instead of dozens. This will greatly speed-up tab loading time. Try it yourself!


Version 1.4.2
  • Added - "watch this tournament" snippet to tournament pages
  • Added - freemiums now have correct rank icons
  • Added - reserved slots now show correctly for waiting games


Version 1.4.1
  • Added - "watch" snippet to each [game] tag
  • Added - empty slots now show correctly for waiting games
  • Fixed - USA map pack names don't overlap anymore
  • Fixed - game players don't overlap anymore


Version 1.4.0
  • Added - confirmation on "unwatch all games" action.
  • Added - Chrome support
  • Added - Sort by game number option


Version 1.3.3:
  • Added - option to watch waiting games
  • Fixed - script was not loading tab when you were watching game that has recently expired
  • Fixed - script was not loading tab when there were no games being watched


Version 1.3.2:


Version 1.3.1:


Version 1.3.0:
  • Script menu added
  • You can now follow tournament active games and players' active games
  • Added version control system


Version 1.2.3:
  • Bug fixing due to site changes
  • Escaping apostrophe and quote characters in map names
  • Fixed Cook players breaking the script


Version 1.2.2:
  • Fixed 'watch' links not showing on game finder pages.
  • Added ratings pages to excludes.


Version 1.2.1:
  • Fixed beta maps overlay


Version 1.2:
  • Major code rewrite (and I mean major)
  • Changed the script to use CC API
  • Games are now sorted by time (desc - so you see games with recent changes on top)


Version 1.1a, 1.1b:
  • Bug fixing due to site changes


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 [player]sherkaner[/player] for code snippet)
  • Fixed bug to display watch/unwatch link inside the game below the players list
[/spoiler]

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
Lindax
Tournament Director
Tournament Director
Posts: 11208
Joined: Sun Jan 20, 2008 12:58 pm
Location: Paradise Rediscovered

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

Post 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
"Winning Solves Everything" - Graeko
Foxglove
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

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

Post by Foxglove »

I like it! Very nice. :D
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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 :).
Image
User avatar
saraith
Posts: 476
Joined: Tue Aug 12, 2008 4:13 am
Gender: Male
Location: Cow-Town

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

Post 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. :)
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
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post by Dako »

It's not foggy but that would be fun :D.
Image
User avatar
chipv
Head Tech
Head Tech
Posts: 3058
Joined: Mon Apr 28, 2008 5:30 pm

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

Post by chipv »

Excellent script!

You can use the <time_remaining> tag to sort by remaining round time, btw.
Foxglove
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

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

Post 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
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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.
Image
User avatar
chipv
Head Tech
Head Tech
Posts: 3058
Joined: Mon Apr 28, 2008 5:30 pm

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

Post 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!
Foxglove
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

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

Post 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.
endar1077
Posts: 313
Joined: Sat Feb 09, 2008 6:28 pm
Gender: Male
Location: Auburn, CA

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

Post 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!
Highest score: Colonel, 2786, #124
Image
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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).
Image
endar1077
Posts: 313
Joined: Sat Feb 09, 2008 6:28 pm
Gender: Male
Location: Auburn, CA

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

Post 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. ;-)
Highest score: Colonel, 2786, #124
Image
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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 :).
Image
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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 [player]sherkaner[/player] for code snippet)
  • Fixed bug to display watch/unwatch link inside the game below the players
Image
User avatar
Calidrmr
Posts: 643
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...
Contact:

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

Post 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 [player]sherkaner[/player] 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
mgconstruction
Posts: 1252
Joined: Fri Jun 29, 2007 8:48 pm
Gender: Male

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

Post by mgconstruction »

I love this feature! Saves me time on my tourney results.
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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 [player]sherkaner[/player] 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
Calidrmr
Posts: 643
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...
Contact:

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

Post 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:
[bigimg]http://i19.photobucket.com/albums/b194/calidrmr/ConquerClubGame5852229.png[/bigimg]

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:
[bigimg]http://i19.photobucket.com/albums/b194/calidrmr/ConquerClubGame5852229-unwatch.png[/bigimg]

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.
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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.
Image
User avatar
Calidrmr
Posts: 643
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...
Contact:

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

Post by Calidrmr »

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.
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post 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 :).
Image
User avatar
Calidrmr
Posts: 643
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...
Contact:

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

Post 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!
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.
Dako
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Gender: Male
Location: St. Petersburg, Russia
Contact:

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

Post by Dako »

Thanks for the notice, I will try to look into that as well and see why that happened.
Image
Post Reply

Return to “Tool Archives”