Skip to content

Commit aac053e

Browse files
authored
Merge pull request #2 from xpam-net/test
Update CitaAutoComplete.user.js
2 parents dd60cca + b3af69c commit aac053e

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

CitaAutoComplete.user.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name Cita AutoComplete
33
// @namespace http://xpam.net/
4-
// @version 0.4
4+
// @version 0.5
55
// @description AutoComplete of the cita form
66
// @author Andrey Luzhin
77
// @include https://sede.administracionespublicas.gob.es/*
@@ -116,7 +116,6 @@
116116
if (isDate) setFieldValue('txtFecha', documentDate);
117117
// Country selection
118118
setFieldValue('txtPaisNac', countryCode);
119-
alert(page);
120119
// clickElement(, 'btnAceptar'); // ReCaptcha, no autoclick possible at this time
121120
}
122121

@@ -130,25 +129,20 @@
130129
// If cita not exists
131130
var bts = document.getElementById('btnSiguiente');
132131
if (bts === null) { // NB: if they change id of "Siguiente" button, this script will stop working properly
133-
//alert('No cita');
132+
//Uncomment next string for autorepeat if no cita exists
134133
//clickElement('btnSalir'); // No cita, click "Salir"
135134
}
136135
}
137136

138137
// Second form filling (seventh page)
139-
//if (page == '') {
140-
// ... insert form filling here ...
141-
142-
// Phone number
143-
setFieldValue('txtTelefonoCitado', phoneNumber);
144-
// e-mail
145-
setFieldValue('emailUNO', eMail);
146-
setFieldValue('emailDOS', eMail);
147-
148-
//clickElement('btnEnviar');
149-
//}
150-
151-
152-
// <input id="btnEnviar" type="button" class="mf-button" value="Solicitar Cita" onclick="enviar('solicitud')" />
138+
if (page == 'acVerFormulario') {
139+
// Phone number
140+
setFieldValue('txtTelefonoCitado', phoneNumber);
141+
// e-mail
142+
setFieldValue('emailUNO', eMail);
143+
setFieldValue('emailDOS', eMail);
144+
145+
clickElement('btnSiguiente');
146+
}
153147

154148
})();

0 commit comments

Comments
 (0)