|
1 | 1 | // ==UserScript== |
2 | 2 | // @name Cita AutoComplete |
3 | 3 | // @namespace http://xpam.net/ |
4 | | -// @version 0.4 |
| 4 | +// @version 0.5 |
5 | 5 | // @description AutoComplete of the cita form |
6 | 6 | // @author Andrey Luzhin |
7 | 7 | // @include https://sede.administracionespublicas.gob.es/* |
|
116 | 116 | if (isDate) setFieldValue('txtFecha', documentDate); |
117 | 117 | // Country selection |
118 | 118 | setFieldValue('txtPaisNac', countryCode); |
119 | | - alert(page); |
120 | 119 | // clickElement(, 'btnAceptar'); // ReCaptcha, no autoclick possible at this time |
121 | 120 | } |
122 | 121 |
|
|
130 | 129 | // If cita not exists |
131 | 130 | var bts = document.getElementById('btnSiguiente'); |
132 | 131 | 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 |
134 | 133 | //clickElement('btnSalir'); // No cita, click "Salir" |
135 | 134 | } |
136 | 135 | } |
137 | 136 |
|
138 | 137 | // 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 | + } |
153 | 147 |
|
154 | 148 | })(); |
0 commit comments