Skip to content

Instantly share code, notes, and snippets.

@tatd3v
Created April 10, 2024 14:01
Show Gist options
  • Save tatd3v/444774246cbbf9b6e45e07a14e932b04 to your computer and use it in GitHub Desktop.
Save tatd3v/444774246cbbf9b6e45e07a14e932b04 to your computer and use it in GitHub Desktop.
PAGO DE PASAPORTE GOBERNACION ANTIOQUIA
// ==UserScript==
// @name Passport Payment Form Automation MED
// @version 0.1
// @description Automate filling out payment form
// @author Tats
// @match https://sedeelectronica.antioquia.gov.co/pasaporte/user/pago/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const REQUESTER_NAMES = 'Jose Fernando';
const REQUESTER_LAST_NAME = 'Leon Ravelo';
const REQUESTER_CC = '1.001.547.278'; // Número de cédula
const REQUESTER_MOBILE = '3026072923';
const REQUESTER_EMAIL = '[email protected]';
const REQUESTER_PASSPORT_TYPE = '5c5a446a15ab22a64d531d80704d4d88d5928a0a' // Pasaporte ordinario
function fillOutPaymentForm() {
document.getElementById("tipo_ide").value = 'CC';
document.getElementById("num_ide").value = REQUESTER_CC;
document.getElementById("num_ide_confirm").value = REQUESTER_CC;
document.getElementById("nombre").value = REQUESTER_NAMES;
document.getElementById("apellido").value = REQUESTER_LAST_NAME;
const cellphoneId = document.getElementById("p_mobile").value;
document.getElementById(cellphoneId).value = REQUESTER_MOBILE;
document.getElementById("email").value = REQUESTER_EMAIL;
document.getElementById("email_confirm").value = REQUESTER_EMAIL;
const passportTypeId = document.getElementNyId("p_tipo_pasaporte").value;
document.getElementNyId(passportTypeId).value = REQUESTER_PASSPORT_TYPE;
document.getElementById('acepto').checked = true;
}
function checkPage() {
if (document.body.innerText.includes("Realice el pago de su pasaporte")) {
fillOutPaymentForm();
}
}
window.addEventListener('load', checkPage);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment