Posts: 22 Liked others: 11 Was liked: 19
Rank: KGS 2 dan
Hey,
I made a small script that adds gender and country/region filters to goratings.org.
How to use in Chrome Browser? Please note! An updated version of the script is in post #4 1. Add a new bookmark in Chrome (Right click the bookmark bar and select "Add Page..."). Add a name (for example "Enhance Ratings"). 2. Copy-paste the following script to the URL part of the bookmark. Save.
Full Code Here is an easier-to-read version of the code (without the javascript: prefix). Feel free to inspect or improve, but please share with everyone if you make something cool
Code:
function fn(){ tables = Array.from(document.getElementsByTagName("tbody")); rankingTable = tables.at(-1); rankingTableRows = Array.from(rankingTable.children); if (rankingTableRows[0].children.length > 5) { console.log("Already initialized.."); } else { console.log("Initializing the enhanced rankings.."); gender = "all"; flag = "all";
Posts: 22 Liked others: 11 Was liked: 19
Rank: KGS 2 dan
pajaro wrote:
Have you tried submitting it to Rémi Coulom?
Hey thanks! I just sent him an email! Let's see what he thinks!
Btw. I have some other ideas for the website too! Ideas that stats nerds like me would love. If I have free time next week, I'll try to implement something
Posts: 22 Liked others: 11 Was liked: 19
Rank: KGS 2 dan
An update! 1. A new column: Age 2. You can now sort by Age or Elo. 3. Age column also has filters, so you can get rankings for different age groups.
Here are the ratings for women under 18:
Please let me know what you think
How to use in Chrome browser? 1. Add age data to Chrome local storage. 1a. First, navigate to https://www.goratings.org/en/ (The local storage is site specific, so the website has to be open before adding data to the storage!) 1b. Then, open Chrome devtools console: Click the three dots ⋮ in the upper right-hand corner of the browser window. Choose More Tools -> Developer Tools. Make sure that Console-tab is open. 1c. Finally copy-paste the following code to the console and press enter. It adds the date of birth data to goratings local storage for age calculation. (You only need to do this step once, unless you erase your browsing data)
Please Note! This was updated on 2022-03-23! You have to re-do this step to get the latest birthdays!
2. Add the UPDATED script to a chrome bookmark 2a. First, right click the bookmark bar and select "Add Page...". (or simply edit a bookmark if you have added it earlier). Add a name (for example "Enhance Ratings"). 2b. Copy-paste the following UPDATED script to the URL part of the bookmark. Save.
3. Navigate to https://www.goratings.org/en/. Click the bookmark you saved. Voila! (If the age column doesnt appear, please try repeating steps 1 and 2. Let me know if there are any problems!).
Full Code (without the javascript: prefix) Feel free to inspect or improve. Please share if you made something cool
function sorter(a,b) { a = parseFloat(a.children[columnIndex].textContent); b = parseFloat(b.children[columnIndex].textContent); if (isNaN(a) && isNaN(b)) return 0; if (isNaN(a)) return 1; if (isNaN(b)) return -1;
if (a < b) return isSortAsc ? -1 : 1; if (a > b) return isSortAsc ? 1 : -1; return 0; }
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Wow, these are really great !
I could do the first one last time around easily on a browser other than chrome, just this one I'd have to figure out now. But the first one has been more than useful!
Posts: 22 Liked others: 11 Was liked: 19
Rank: KGS 2 dan
Elom0 wrote:
Wow, these are really great !
I could do the first one last time around easily on a browser other than chrome, just this one I'd have to figure out now. But the first one has been more than useful!
Thanks!
All major browsers should support localStorage and they surely have a console to access it. Bookmarking a script may have some character limitations hmm
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Toukopouko wrote:
Elom0 wrote:
Wow, these are really great !
I could do the first one last time around easily on a browser other than chrome, just this one I'd have to figure out now. But the first one has been more than useful!
Thanks!
All major browsers should support localStorage and they surely have a console to access it. Bookmarking a script may have some character limitations hmm
Let me know if I can be of any help!
Great! I'm using brave for easy access to ecosia, perhaps I made an error somewhere pasting it into the console, or the name of the store is slightly different from chrome and other's window.localStorage.setItem, which is what I'm checking next . . .
Posts: 22 Liked others: 11 Was liked: 19
Rank: KGS 2 dan
Elom0 wrote:
Great! I'm using brave for easy access to ecosia, perhaps I made an error somewhere pasting it into the console, or the name of the store is slightly different from chrome and other's window.localStorage.setItem, which is what I'm checking next . . .
Hmm! One thing I forgot in the instructions! You have to be at goratings.org before adding the data to the local storage! (The storage is site specific!). I hope this helps and sorry about that!
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Toukopouko wrote:
Elom0 wrote:
Great! I'm using brave for easy access to ecosia, perhaps I made an error somewhere pasting it into the console, or the name of the store is slightly different from chrome and other's window.localStorage.setItem, which is what I'm checking next . . .
Hmm! One thing I forgot in the instructions! You have to be at goratings.org before adding the data to the local storage! (The storage is site specific!). I hope this helps and sorry about that!
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
It would probably be a bit to tricky to implement so this is not a request, but maybe in the slightly far future it might be possible to select multiple flags at once!
It might be a bit interesting checking rankings between Korea and China (both parts), but most intersting may be rankings between Taiwan and Japan which could be very interesting . . ! (Amongst Japanese and Taiwanese professionals combined Xu Haohong is 3rd!). Although honestly so many Taiwanese are top Japanese pros, that perhaps it's best to often treat Taiwan and Japan as one and the same group.
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Elom0 wrote:
It would probably be a bit to tricky to implement so this is not a request, but maybe in the slightly far future it might be possible to select multiple flags at once!
It might be a bit interesting checking rankings between Korea and China (both parts), but most intersting may be rankings between Taiwan and Japan which could be very interesting . . ! (Amongst Japanese and Taiwanese professionals combined Xu Haohong is 3rd!). Although honestly so many Taiwanese are top Japanese pros, that perhaps it's best to often treat Taiwan and Japan as one and the same group.
This is a miracle for incompetent at programming me but this might work
function sorter(a,b) { a = parseFloat(a.children[columnIndex].textContent); b = parseFloat(b.children[columnIndex].textContent); if (isNaN(a) && isNaN(b)) return 0; if (isNaN(a)) return 1; if (isNaN(b)) return -1;
if (a < b) return isSortAsc ? -1 : 1; if (a > b) return isSortAsc ? 1 : -1; return 0; }
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Okay I'm terrible at programming so I can't seem to make it work.
But I found out by happy accident that I can just manually change the alt to jp for a few.
Seki Kotaro, a title holder, is ranked in the 30's . . . Ryan is one place ahead of Xie Yimin at 141. But none of the European League or Transatlantic League games are in the go4go database . . . huh? Also there don't seem to be games from the American Go Congresses and few from the European Go Congress.
Attachment:
Web capture_10-6-2022_141544_www.goratings.org.jpeg [ 1.55 MiB | Viewed 21324 times ]
Attachment:
Web capture_10-6-2022_141645_www.goratings.org.jpeg [ 1.6 MiB | Viewed 21324 times ]
Attachment:
Web capture_10-6-2022_142239_www.goratings.org.jpeg [ 1.41 MiB | Viewed 21323 times ]
Last edited by Elom0 on Fri Jun 10, 2022 6:23 am, edited 3 times in total.
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Top 25 Japanese&Taiwanese pros with top two female pros
Attachment:
Web capture_10-6-2022_125155_www.goratings.org.jpeg [ 267.59 KiB | Viewed 21324 times ]
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Okay I just found a shoddy workaround instead, putting this in the bookmark bar should work.
function sorter(a,b) { a = parseFloat(a.children[columnIndex].textContent); b = parseFloat(b.children[columnIndex].textContent); if (isNaN(a) && isNaN(b)) return 0; if (isNaN(a)) return 1; if (isNaN(b)) return -1;
if (a < b) return isSortAsc ? -1 : 1; if (a > b) return isSortAsc ? 1 : -1; return 0; }
function sorter(a,b) { a = parseFloat(a.children[columnIndex].textContent); b = parseFloat(b.children[columnIndex].textContent); if (isNaN(a) && isNaN(b)) return 0; if (isNaN(a)) return 1; if (isNaN(b)) return -1;
if (a < b) return isSortAsc ? -1 : 1; if (a > b) return isSortAsc ? 1 : -1; return 0; }
Posts: 732 Liked others: 1028 Was liked: 32
Rank: BGA 3 kyu
KGS: Elom, Windnwater
OGS: Elom, Elom0
Online playing schedule: The OGS data looks pretty so I'll pause for now before I change it.
Ah, goratings.org seems to be out of service at the moment . . .
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum