Alilou
Alilou
// @name aLiLoU
// @namespace http://tampermonkey.net/
// @version 2,9
// @author TouiMi
// @match
https://algeria.blsspainglobal.com/*/blsAppointment/ManageAppointment*
// @downloadURL none
// ==/UserScript==
'use strict';
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
/*$$ IMAGES LINKS $$ IMAGES LINKS $$*/
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
const IMages = [{
}];
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
/* DON'T TOUTCH ANYTHING $$ DON'T TOUTCH ANYTHING $$ DON'T TOUTCH ANYTHING $$ DON'T
TOUTCH ANYTHING */
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
if(document.querySelector('#progress-percent').textContent == '0%'){
var slo = '';var ttt;
for (let i = 1; i <= 10; i++) {
const elementId = 'AppointmentDate' + i ;
const element = $('#' + elementId);
if (element.is(':visible')) {
slo=elementId;}}
var ids = ['AppointmentSlot1', 'AppointmentSlot2', 'AppointmentSlot3',
'AppointmentSlot4', 'AppointmentSlot5'];
ids.forEach(function(id) {
var element = $(".k-widget.k-dropdown.form-control[aria-owns='" + id +
"_listbox']");
if (element.is(":visible")) {
ttt = "AppointmentSlot" + id.slice(15);}});
$(`#${ttt}`).kendoDropDownList({
optionLabel: "--Select--",
dataTextField: "Name",
dataValueField: "Id",
filter: "contains",
select: OnSlotSelect,
open: OnSlotOpen,
template: modifiedTemplate,
footerTemplate: ({ instance }) => $("#slot-footer-template").html(),
height: 500
});
var familyElement = document.querySelector('.card-body');
$('#btnVerifyAppointment').show()
var toggleButton = document.createElement('button');
toggleButton.textContent = 'Category';
var isToggled = false;
toggleButton.addEventListener('click', function() {
if (isToggled) {$(`li.k-item:contains('Normal')`).click();} else {$(`li.k-
item:contains('Premium')`).click();}
isToggled = !isToggled;
LoadAppointmentDates(ttt.slice(15),slo.slice(15));});
toggleButton.style= 'border-radius: 8px; margin-left : 7px;color : red; font-
weight:bold ;'
if (all.includes('success')) {
clearInterval(dddd);
clearInterval(chng);
var Ville = document.querySelector('#LocationId-list .k-state-
selected').textContent;
var typ = document.querySelector('.k-list-scroller .k-
state-selected').textContent;
document.querySelector(`#$
{slo}`).style.backgroundColor = '#44c611';
document.querySelector(`#${slo}`).placeholder =
'Rendez-vous Disponible';
var MsgTxt = new SpeechSynthesisUtterance((`Rendez-vous BLS $
{ville} ${typ} Disponible. `).repeat(2));
window.speechSynthesis.speak(MsgTxt);
if(localStorage.getItem('dateSelectValue') != 0){choose();}
} else {
document.querySelector(`#$
{slo}`).style.backgroundColor = '#f14242';
document.querySelector(`#${slo}`).placeholder = 'By
Devteamscripts';
if (document.getElementById('DateCss').textContent == '\n' )
{document.querySelector(`#$
{slo}`).style.backgroundColor = '#0d59de';}
}}}
function choose() {
function ss() {
if ($(`#${slo}`).val() !== '') {
clearInterval(timm);
$(`#${ttt}`).click();
if($(".slot-item.bg-success").length >= 1){
clearInterval(tim);
$(".slot-item.bg-success").last().click();
clearInterval(tim);clearInterval(timm);
$('#btnSubmit').show()
$('#btnVerifyAppointment').show()
$("#EmailVerified").val('True');
$
("#EmailCode").val("KKnqIaDw7rrS5SutHPG0xYKdCisBQw8PZQJhAnoZ3Zw3ZRuP+I+k+1rlgo6QPu+
9VxptcuXIR5qpAuSLPigVen0tOsGlFrsYwteSDon80Pxi3l1X9af2t2ftDfaohzO4");
$("#EmailVerificationCode").val("373072");
VerifyAppointment();
if ($(`#${ttt}`).val() !== ''){
$('#btnSubmit').click();}}
}}}
function img() {var imageUrl = "";var linkText =
document.querySelector('a.h6').innerText.replace(/\s/g, '');
for (var i = 0; i < IMages.length; i++) {var obj = IMages[i];
if (obj.hasOwnProperty(linkText)) {imageUrl = obj[linkText];break;}}const fileInput
= document.getElementById('uploadfile-1');
var xhr = new XMLHttpRequest();xhr.open("GET", imageUrl, true);
xhr.responseType = "blob";xhr.onload = function () {if (xhr.status === 200) {
var blob = xhr.response;var fd = new FormData();fd.append('file', blob,
"image.jpg");
$.ajax({url: "/dza/query/UploadProfileImage",type: 'post',data: fd,contentType:
false,processData: false,success: function (result) {
if (result.success) {$("#uploadfile-1-preview").attr("src", "/dza/query/getfile?
fileid=" + result.fileId);
$("#ApplicantPhotoId").val(result.fileId);} else {alert(result.err);}}
});} else {alert("Failed to retrieve the image from the URL.");
}};if (imageUrl.length>=1) {xhr.send();}}img()}