Go back
Grease Monkey script

Grease Monkey script

Site Ideas

Clock
Vote Up
Vote Down

Does anyone know how to write a script to automatically calculate the piece count as a chess piece is captured? And if so could they please provide it. That is if it can be done.

Clock
Vote Up
Vote Down

Originally posted by cashthetrash
Does anyone know how to write a script to automatically calculate the piece count as a chess piece is captured? And if so could they please provide it. That is if it can be done.
I think Ourborous is the guy to speak to about greasemonkey on this site.

Clock
Vote Up
Vote Down

Originally posted by Freddie2006
I think Ourborous is the guy to speak to about greasemonkey on this site.
Ahh that's right thanks.

Clock
Vote Up
Vote Down

Originally posted by cashthetrash
Does anyone know how to write a script to automatically calculate the piece count as a chess piece is captured? And if so could they please provide it. That is if it can be done.
Doesn't that already happen?

Clock
Vote Up
Vote Down

I would like to know if the get PGN/FEN script can be adapted for the new games pages.

Clock
Vote Up
Vote Down

Originally posted by XanthosNZ
I would like to know if the get PGN/FEN script can be adapted for the new games pages.
It already is.

D

Clock
Vote Up
Vote Down

Originally posted by XanthosNZ
Doesn't that already happen?
Not that I am aware of.

Clock
Vote Up
Vote Down

Originally posted by XanthosNZ
I would like to know if the get PGN/FEN script can be adapted for the new games pages.
Why?

Clock
Vote Up
Vote Down

Originally posted by cashthetrash
Why?
So that when I want the PGN of a game (say for looking up in my database for opening play or analysing a finished game or just because) I don't have to go via the History page.

As for it already being fixed, this is what happens when developers isn't on the forums dropdown list. I forget to check it.

Also I misread your initial request, I know the pieces taken updates automatically but you want a piece score total (9 for queen, 5 for rook etc.) and it has to update automatically. I know having it check on load is possible (count instances of certain images and multiply) but I don't know if autoupdate is possible.

As Fred said, Ourborous is the man you want to talk to (check the developers forum).

Clock
Vote Up
Vote Down

Originally posted by XanthosNZ
So that when I want the PGN of a game (say for looking up in my database for opening play or analysing a finished game or just because) I don't have to go via the History page.

As for it already being fixed, this is what happens when developers isn't on the forums dropdown list. I forget to check it.

Also I misread your initial request, I know the pi ...[text shortened]... ble.

As Fred said, Ourborous is the man you want to talk to (check the developers forum).
Yes, I can see your point and thanks. I sent an email yesterday, hopefully I will get a reply. Good luck.

Clock
Vote Up
Vote Down

Originally posted by cashthetrash
Yes, I can see your point and thanks. I sent an email yesterday, hopefully I will get a reply. Good luck.
Looking into this one. Appears tougher than I would have suspected because the "taken" pieces are seem to be generated by Javascript.

Clock
Vote Up
Vote Down

Okay, check out:

http://members.shaw.ca/ouroboros/RHP/piececount.user.js

Haven't tested it extensively so expect bugs. 🙂

Clock
Vote Up
Vote Down

Originally posted by ouroboros
Okay, check out:

http://members.shaw.ca/ouroboros/RHP/piececount.user.js

Haven't tested it extensively so expect bugs. 🙂
Could you rewrite it to take into account the position on the board when making the calculation? 😉

D

Clock
Vote Up
Vote Down

Originally posted by Ragnorak
Could you rewrite it to take into account the position on the board when making the calculation? 😉

D
How so? It should dynamically update once after you have captured a piece on the board.

Clock
Vote Up
Vote Down

Originally posted by ouroboros
How so? It should dynamically update once after you have captured a piece on the board.
He was making a joke that you could add positional considerations to your algorithm and in effect create a crude position score somewhat similar to the way an engine does.

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.