80% found this document useful (5 votes)
1K views2 pages

Script Famille (2 Personnes) سكربت عائلى للشخصين

This document contains a userscript that automatically fills out forms on the Algeria visa application website. It retrieves available application dates from the page code and populates the date field. It then populates fields like names, passport numbers, dates of birth for two applicants using hardcoded values. After filling the form, it reloads the page after 19 seconds if the date field is still empty.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
80% found this document useful (5 votes)
1K views2 pages

Script Famille (2 Personnes) سكربت عائلى للشخصين

This document contains a userscript that automatically fills out forms on the Algeria visa application website. It retrieves available application dates from the page code and populates the date field. It then populates fields like names, passport numbers, dates of birth for two applicants using hardcoded values. After filling the form, it reloads the page after 19 seconds if the date field is still empty.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

// ==UserScript==

// @name deux personnes


// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://algeria.blsspainvisa.com/*
// @grant none
// ==/UserScript==

(function sayHi() {
/partie overlay/
'use strict';
let code = document.scripts[12].text;
let bgn = code.indexOf("available_dates");
let end = code.indexOf("fullCapicity_dates");
let table = code.slice(bgn+20, end-9);
if (table !== ""){
let datee = table.slice(1,11);
let dd = datee.slice(0,2);
let mm = datee.slice(3,5);
let yyyy = datee.slice(6,10);
let dateeFin = [yyyy, mm, dd];
let finDate= dateeFin.join("-");
if(document.getElementById("app_date").value.length === 0 && finDate !==
"")
{
$('#app_date').datepicker("update" ,finDate);
}else if (document.title == "504 Gateway Time-out" || document.title ==
"502 Bad Gateway" || document.title == "504 Gateway Timeout") {

window.setTimeout(function(){ location.reload(); }, 500);

/Get page (1) OPEN PAGE AND GET AUTO REPLAY/


} else
{
let lastNames =["Prénom 1","Prénom 2"],
firstNames =["Nom de famille 1","Nom de famille 2"],
births =["yyyy-mm-dd","yyyy-mm-dd"],
passNumbers =["passport No 1","passport No 2"],
issueDates =["yyyy-mm-dd","yyyy-mm-dd"],
expiryDates =["yyyy-mm-dd","yyyy-mm-dd"],
pptissuePalaces =["city 1","city 2"],
number = 2,
j=1;
setTimeout(function(){
for(let i=0; i<=number-1; i++){
document.getElementById('app_time-'+j).selectedIndex =
document.getElementById('app_time-'+j).length-1;
document.getElementById('VisaTypeId-'+j).selectedIndex = "1";
document.getElementById('first_name-'+j).value=firstNames[i];
document.getElementById('last_name-'+j).value=lastNames[i];
document.getElementById('passport_number-'+j).value=passNumbers[i];
$('#date_of_birth-'+j).datepicker("update" ,births[i]);
$('#pptIssueDate-'+j).datepicker("update" ,issueDates[i]);
$('#pptExpiryDate-'+j).datepicker("update" ,expiryDates[i]);

document.getElementById('pptIssuePalace-'+j).value=pptissuePalaces[i];
j++
}
}, 4000)
}
}
if(document.getElementById("app_date").value.length === 0)
{
setTimeout(function(){window.location.reload(1);}, 19 * 1000);
}

})();

You might also like