Last active
June 7, 2021 01:20
-
-
Save hutch120/a53a9f484f7c2282dd8e0e6239ec3c91 to your computer and use it in GitHub Desktop.
Booking a Vaccination at Northern Health
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Press F12 to open the web browser console | |
// Copy/Paste this script in the browser console to skip the questions at https://vaccination.nh.org.au/ | |
// | |
function run () { | |
const showClasses = [ | |
'wpforms-page wpforms-page-1', | |
'wpforms-page wpforms-page-2', | |
'wpforms-page wpforms-page-3', | |
'wpforms-page wpforms-page-4', | |
'wpforms-page wpforms-page-5', | |
'wpforms-page wpforms-page-6', | |
'wpforms-page wpforms-page-7', | |
'wpforms-submit-container' | |
] | |
const showIds = [ | |
'wpforms-3746-field_29-container', | |
'wpforms-3746-field_31-container', | |
'wpforms-3746-field_16-container' | |
] | |
const textFields = ['wpforms-3746-field_2'] | |
const radioButtons = [ | |
'wpforms-3746-field_3_4', | |
'wpforms-3746-field_25_2', | |
'wpforms-3746-field_5_2', | |
'wpforms-3746-field_6_8', | |
'wpforms-3746-field_7_2', | |
'wpforms-3746-field_8_2', | |
'wpforms-3746-field_28_1' | |
] | |
const form = 'wpforms-submit-3746' | |
// Optional: Shows all the form options | |
showClasses.forEach(className => { document.getElementsByClassName(className)[0].style = '' }) | |
showIds.forEach(id => { document.getElementById(id).style = '' }) | |
// Fill in fields | |
textFields.forEach(id => { document.getElementById(id).value = '45' }) | |
radioButtons.forEach(id => { document.getElementById(id).click() }) | |
// Click submit | |
document.getElementById(form).click() | |
return true | |
} | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment