Skip to content

Instantly share code, notes, and snippets.

@arnaudvalle
Last active November 3, 2020 08:21
Show Gist options
  • Save arnaudvalle/f1641592cd8531fbd059f610d1271c32 to your computer and use it in GitHub Desktop.
Save arnaudvalle/f1641592cd8531fbd059f610d1271c32 to your computer and use it in GitHub Desktop.
Attestation de déplacement dérogatoire - Chrome snippet
// https://developers.google.com/web/tools/chrome-devtools/javascript/snippets
const now = new Date();
const hoursWithLeadingZero = `0${now.getHours()}`.slice(-2);
const minutesWithLeadingZero = `0${now.getMinutes()}`.slice(-2);
document.querySelector('#field-firstname').value = 'PRENOM';
document.querySelector('#field-lastname').value = 'NOM';
document.querySelector('#field-birthday').value = 'DATE DE NAISSANCE (JJ/MM/YYYY)';
document.querySelector('#field-placeofbirth').value = 'LIEU DE NAISSANCE';
document.querySelector('#field-address').value = 'ADRESSE';
document.querySelector('#field-city').value = 'VILLE';
document.querySelector('#field-zipcode').value = 'CODE POSTAL';
document.querySelector('#field-heuresortie').value = `${hoursWithLeadingZero}:${minutesWithLeadingZero}`;
document.querySelector('#checkbox-achats').checked = true;
document.querySelector('#generate-btn').click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment