These simple userscripts automate registration for a single volunteer on the next dojo in a city.
If you're a volunteer coach just install and use it.
If you're a lead coach, and you want to register your volunteers, consider creating multiple firefox profiles and install the scripts in each of them to make this easier. Or, you could copy-paste the json of the volunteer's personal data prior to visiting the form. Set Tampermonkey config mode to advanced to see the json settings in the settings tab on the extension's editor page for the script eventbrite-checkout-coach.
If you're a parent or guardian, or an attendee, and you want to use this, it sould not be too hard to adapt this. You might want to just remove the "ticket-quantity-selector" if statement in eventbrite-checkout-coach to manually select a track, and modify it to add additional data if the attendee data is different from the person making the reservation. The timeconsuming part would be to be able to add multiple attendees in one go. Selecting elements with random id's and no other discernible features buried in layers of nested div's is difficult. Plus, there might be some React trickery going on.
- install Tampermonkey on Firefox (which allows scripts to run at document-start contrary to most other browsers)
- install the three
*.user.jsscripts by clicking the raw button - bookmark a city filter query url for your city like
https://coderdojobelgium.be/nl/dojos?city=maldegem
- browse to your bookmarked Coderdojo Belgium dojos page
- wait for the prompts on the checkout form (comment on this gist if you have problems)
- fill in your personal details once (this is stored alongside the userscript)
- once you verified that it works, uncomment the line below
// uncomment to actually register
Just browse to your bookmark. There might be an additional question after registration. I'm not yet sure if registration is complete when you skip this. Anyway this is not automated yet.
- the first script waits for, and clicks, the first CoderDojo register button on coderdojobelgium.be
- the second script waits for, and clicks the Eventbrite registeration form button and redirects to the form's iframe url when that appears
- the third script runs on the Eventbrite registeration checkout form:
- first you're prompted for missing personal data to be stored
- a ticket on the first select element in the document is chosen as it matches a coach ticket for Maldegem Dojos (you might need to adapt this if it is a hidden ticket or if it is not the first element!)
- when React updates the
#order-summary-containera recursive functionwaitForReactOnClickEventHandleris called until the register button's onlick handler exists, and then the button is clicked - then, it waits for a
<section>; This appeared to me the only way to detect when the second checkout form loaded which is conspicuous to me. - a bunch of wrapper functions are then used to use the native value setters on input and select elements and trigger the React hooks
- if you uncommented the
waitForReactOnClickEventHandlerinfilloutForm(), and the form validates correctly, you'll be taken to additional questions after registration.
Eventbrite is in my opinion a very slow React piece of garbadge which has annoying features which are never needed for free of charge events like Coderdojo. On the other hand, event organizer features for usability are missing. Simple crucial things like finding and printing a list of registrations is even hard. Hidden tickets are hidden for everyone. You can't make them visible for select accounts: so the lead must register the volunteer. Why Eventbrite, why?
In summary:
- It's cumbersome for lead coaches
- Coderdojo asks too many questions, surely nobody likes marketing surveys
- it is unnecessarily slow to actually register to the event every month, the console is flooded with CORS errors, ...
Manually creating events and repeated registration however can't be solved with recurring events because these can't be integrated easily in Coderdojo Belgium's Drupal website, and also because events might not be as recurrent for every location.
Oh did I mention that it is extremely slow and annoying?
We could orchestrate automatic login of a lead coach using Selinium in a VPS with the undetected-chromedriver Python package to prevent detection by Eventbrite, and a bunch of scripts triggered with webhooks to automate stuff. One script for making events from a template event could be useful, maybe based on a spreadsheet, because the Eventbrite API does not allow for this. Also there should be an easy way for lead coaches to bulk add a number of attendees in particular tracks on the next event. This should ease the pain for regular attendee's parents/guardians, but then it's up to the lead coach to determine when to do so, at risk of being fully booked.
Get rid of Eventbrite as a requirement. Coderdojo Belgium may be fun and free of charge, but we don't really carry out the "free" as in freedom as much as I'd like. Self-host an open source ticketing system geared toward small volunteering communities. Also prepare for self-hosting online events.