Untitled

mail@pastecode.io avatar
unknown
javascript
a year ago
2.4 kB
66
Indexable
Never
// ==UserScript==
// @name         BLS take rdv
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Abdennour Mezouar
// @match        https://algeria.blsspainglobal.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let data = [
    {
        familial: false,
        email: 'hamdaoui0799@gmail.com',
        password: "Khalil13@",
        members: 4,
    },

]


/***** don't touch */
data.map(index=> {

    setInterval(()=> {

        let href = window.location.href
        if(href.includes("login")) {
            for(let i=0; i<10; i++) document.querySelector("#UserId"+(i+1)).value = index.email
        document.querySelector("input.input-sm").value = index.password
        $("#rememberCheck").click()
        setTimeout(()=> $("#btnVerify").click(), 500)
    } else if(href.toLowerCase().includes("visatypeverification")) {
                if(document.querySelector("iframe")) return;
        document.querySelector("#btnVerify.btn").click()
        setInterval(()=> document.querySelector("#btnSubmit")?.click(),1000)
    } else if(href.includes("visatype")) {
        for(let i=0; i<10; i++) $("#AppointmentCategoryId"+(i++))?.data("kendoDropDownList")?.select(1)
        if(!index.familial) {
            for(let i=0; i<10; i++) document.querySelector('#self'+(i+1)+'[name="AppointmentFor'+(i+1)+'"]')?.click()
            for(let i=0; i<10; i++) $("#ApplicantsNo"+(i+1))?.data("kendoDropDownList")?.select(1)

}
else for(let i=0; i<5; i++) {
    document.querySelector('#family'+(i+1)+'[name="AppointmentFor'+(i+1)+'"]')?.click()
    OnFamilyAccept()
    for(let i=0; i<5; i++) $("#ApplicantsNo"+(i+1))?.data("kendoDropDownList")?.select(index.members-1)
}
for(let i=0; i<5; i++) {
    $("#VisaType"+(i+1))?.data("kendoDropDownList")?.select(1)
    $("#VisaSubType"+(i+1))?.data("kendoDropDownList")?.setDataSource(visasubIdData.filter(e=> e.Name === "Schengen Visa")
    );

        }
        for(let i=0; i<5; i++) $("#AppointmentCategoryId"+(i+1))?.data("kendoDropDownList")?.select(1)
        for(let i=0; i<5; i++) $("#Location"+(i+1))?.data("kendoDropDownList")?.select(2)

    setTimeout(()=> $("#btnSubmit")?.click(),2000)

}
}, 10 * 1000)

})

})();