Page 1 of 3

Hand History Downloader

Posted: Fri Jan 03, 2025 5:12 pm
by strobe878
Hacked this together, figured it might be useful to other folks.

https://codepen.io/strobe878/pen/vEBWemK?editors=1000

Requirements
  • Pro or Gold license
  • Admin access
  • Desktop web browser only, no mobile support
  • Tested only on PM 7.20, other versions YMMV
Installation
  • Copy the linked HTML file
  • Open your Admin panel and paste into System > Web Settings > Head section HTML
Usage
  • To download hands, Lobby > Account > Download hand histories...
  • To clear saved hands, Lobby > Account > Clear hand histories...
How it works
Each hand is saved into your browser's IndexedDB storage and persists across page refreshes and browser restarts. Each player gets a unique database so if you are sharing a computer with another Mavens user the hands won't be overwritten. Note that anyone with access to your browser will be able to inspect the data.

Re: Hand History Downloader

Posted: Fri Jan 03, 2025 7:35 pm
by strobe878
I just made a small optimization and updated the linked code and have added a Version number at the top:

Code: Select all

<!-- Version 1 -->

Re: Hand History Downloader

Posted: Sat Jan 04, 2025 2:14 pm
by strobe878
Oh . . . I realized this could be run as a UserScript by anyone without having the admin load it on the backend. Here is a version that works with the Tampermonkey browser extension: https://codepen.io/strobe878/pen/JoPOaxw?editors=1000

You just have to edit line 7 of the script to match your Mavens server URL.

Re: Hand History Downloader

Posted: Sun Jan 05, 2025 5:02 pm
by strobe878
Updated the userscript to run on mobile and posted the script to GreasyFork: https://greasyfork.org/en/scripts/52294 ... tory-saver

For mobile you need the TamperMonkey app.

Re: Hand History Downloader

Posted: Fri Jan 10, 2025 4:16 pm
by Grim
I tested this on win10, Chrome and tampermonkey shows it running, it's enabled and all good but when I select download hand history, I get a popup saying No handhistories available for download. This happens after I left one table and are still sitting at another.

Edit: Running on PMavens 7.22 btw.

Re: Hand History Downloader

Posted: Fri Jan 10, 2025 4:44 pm
by strobe878
Presumably you played some hands?

Re: Hand History Downloader

Posted: Fri Jan 10, 2025 4:48 pm
by strobe878
Discord IMs might be more convenient for troubleshooting: https://www.briggsoft.com/forums/viewtopic.php?t=4069

My handle on there is also strobe878.

Re: Hand History Downloader

Posted: Fri Jan 10, 2025 5:57 pm
by strobe878
Userscript fixed, Version 3. Wasn't handling tournament tables correctly.

Re: Hand History Downloader

Posted: Mon Jan 13, 2025 2:36 pm
by Grim
So a couple of things that struck me, I don't know how realistic this is as I don't know the capabilities nor limitations of userscripts and browsers, but here goes...
It would be nice to download the hh in bigger files, i.e. per session at a table. So all e.g. 108 hands on one table as one text file.

Some option for automation would also be cool, e.g. auto download either each hand (as a separate file) as it concludes or all hands as a single file when leaving a table. I think the former might be slightly more annoying than useful though.

One question though, if I refresh the browser now will it clear all hands?

Re: Hand History Downloader

Posted: Mon Jan 13, 2025 3:29 pm
by strobe878
Refreshing (or closing) the browser, logging out, etc., does not clear the hands. That is the main reason I wrote this script because I can never remember to download the history ;-)

Given that, the complexity around auto-downloading I think is not worth the effort. At least I'm not inclined to give it go.

I should be able to do a single file per session, that's a good idea.