-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloaded PGN files dynamically titled based on PGN data #96
Comments
Hi Matthew, Customizing the However, have you noticed that, by uploading a PGN file to your website and using the syntax |
Thanks, Yoann. It's good to know that workaround exists, although the workflow is a bit cumbersome. I'll consult with my client on whether I should commit time to create a PR. I'll reply again here when I know how we'll proceed. |
The new PGN download button works great!
Currently downloaded files are always titled "game.pgn". We'd like the ability to use the Event data from within the PGN title to change the download's filename.
I have this partially implemented locally. My approach within
rpbchess-ui-chessgame.js
is:switch
block of therefresh()
method, passwidget
as a parameter each timebuildNavigationSkeleton()
is calledbuildNavigationSkeleton(widget)
, get the event title withformatDefault(widget._game.header('Event'))
, and store that as a stringreturn
block ofbuildNavigationSkeleton()
, changedownload="game.pgn"
to use the stored event string, likedownload="' + filename + '"
I haven't tested or polished this yet. I wanted to check in with you before I go further. If this seems like a good direction to go, I can submit a PR if you'd like.
The text was updated successfully, but these errors were encountered: