You are on page 1of 2

// ==UserScript==

// @name Spanish visa application


// @namespace http://tampermonkey.net/
// @version 0.12
// @description 。|This is a script to help you apply for a visa in Spain, he can
quickly fill in the visa page information.
// @author misterchou@qq.com
// @require http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @include https://Algeria.blsspainvisa.com/appointment.php
// @grant none
// @run-at document-end

// @downloadURL none
// ==/UserScript==

(function() {
'use strict';

console.log("Code start");
//Preset information

/*

/*
|Preset infomation
VisaType:
207=Tourism
29=Business
30=Family Visit
31=Property Owner
32=Student
33=Sports Cultural Artistic Scientific
34=Mission
35=Medical Visit
36=Transit
37=Residence Permit
38=Eu Citizens Family Reunification
39=Family Reunification
40=Student
41=Work Permit (Own Account)
42=Work Permit (Third Party)

passportType:
Ordinary passport = 01
Collective passport = 02
Protection passport = 03
Diplomatic passport = 04
Service passport = 05
Government official on duty =06
Special passport = 07
Passport of foreigners = 08
National laissez-passer = 10
UN laissez-passer = 11
Refugee Travel Document (Geneva Convention) = 12
D. Viaje Apatridas C. New York = 13
Official passport = 14
Seaman’s book = 16

*/
//**************************************
//↓↓↓↓↓↓↓↓↓↓|Please fill in the information↓↓↓↓↓↓↓
var
AppointmentTime = "08:30 - 08:45",
VisaType = "29",
first_name = "taib",
last_name = "consulting",
dateOfBirth = "1989-02-21",
passportType = "01",
passport_no = "199258753",
pptIssueDate = "2017-12-07",
pptExpiryDate = "2027-12-06",
PassportIssuePlace = "ALGER";
//↑↑↑↑↑↑↑↑↑**************************************↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

var timer = setInterval(aaa, 1000);


var datas = setInterval(bbb, 100);

function bbb() {
$("#app_date").trigger("focus");
}

//|Determine whether a date has been selected


function aaa() {

if($('#app_date').val() == "") {
clearInterval(datas);
//|Determine if there is an optional date
if($(".datepicker-days .day.activeClass").length > 0) {
//|select date 1
$(".datepicker-days .day.activeClass")[1].click();
} else {
console.log("|No available date");
}
} else {
//|The date has been booked
console.log("|I have made an appointment and started filling in
the information");
$('#app_time').val(AppointmentTime);
$('#VisaTypeId').val(VisaType);
$('#first_name').val(first_name);
$('#last_name').val(last_name);
$('#dateOfBirth').val(dateOfBirth);
$('#passportType').val(passportType);
$('#passport_no').val(passport_no);
$('#pptIssueDate').val(pptIssueDate);
$('#pptExpiryDate').val(pptExpiryDate);
$('#pptIssuePalace').val(PassportIssuePlace);
console.log("|Information completed");
clearInterval(timer);
clearInterval(datas);
$(".datepicker.datepicker-dropdown.dropdown-menu.datepicker-
orient-left.datepicker-orient-top").hide();
}
}

console.log("End of code run");


})();

You might also like