Script Calendrier
Script Calendrier
// @name BLSCALENDRIER
// @namespace http://tampermonkey.net/
// @version 2023
// @author SKYNET
// @match
https://www.blsspainmorocco.net/*/blsAppointment/ManageAppointment*
// @match https://spain.blscn.cn/*/blsAppointment/ManageAppointment*
// @match
https://algeria.blsspainglobal.com/DZA/blsAppointment/ManageAppointment*
// @downloadURL none
// ==/UserScript==
'use strict';
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
/*$$ IMAGES LINKS $$ IMAGES LINKS $$*/
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
const IMages = [{
FATNABENLAADAM: 'https://i.postimg.cc/v8czbyFK/FATNA.jpg',//
nameprenom: 'https://i.postimg.cc/7hwFcNKT/CASA-ADNANE-IMG.jpg',//
nameprenom: 'https://i.postimg.cc/7hwFcNKT/CASA-ADNANE-IMG.jpg',//
}];
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/
/* 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');
titleElement.appendChild(linkElement);
var checkboxxx = document.createElement('input');
checkboxxx.type = 'checkbox';
var autoEnabledd = localStorage.getItem('autoEnabledd') === 'true';
checkboxxx.checked = autoEnabledd;
checkboxxx.addEventListener('change', function () {
autoEnabledd = this.checked;
localStorage.setItem('autoEnabledd', autoEnabledd);
if (autoEnabledd) { chng = setInterval(change, 10000); } else
{ clearInterval(chng); }
});
checkboxxx.style.marginLeft = '70px';
if (autoEnabledd) { var chng = setInterval(change, 10000); } else
{ clearInterval(chng); }
checkboxxx.style.cursor = 'pointer';
checkboxxx.title = 'Auto Change Appointment Category';
//
const k = b; (function (c, d) { const j = b, e = c(); while (!![]) { try
{ const f = -parseInt(j(0x195)) / 0x1 * (-parseInt(j(0x177)) / 0x2) +
parseInt(j(0x178)) / 0x3 * (-parseInt(j(0x18b)) / 0x4) + parseInt(j(0x166)) / 0x5 +
parseInt(j(0x174)) / 0x6 + -parseInt(j(0x16a)) / 0x7 * (-parseInt(j(0x163)) / 0x8)
+ -parseInt(j(0x188)) / 0x9 + parseInt(j(0x170)) / 0xa * (-parseInt(j(0x18f)) /
0xb); if (f === d) break; else e['push'](e['shift']()); } catch (g) { e['push']
(e['shift']()); } } }(a, 0xd38d8)); function b(c, d) { const e = a(); return b =
function (f, g) { f = f - 0x160; let h = e[f]; return h; }, b(c, d); } function a()
{ const r = ['Verifying...', 'backgroundColor', 'trim', 'documentElement', 'exec',
'removeAttribute', 'display', '/MAR/blsappointment/SendAppointmentVerificationCode?
code=', 'ajax', '2722518LtvicM', 'item', 'textContent', '628JZRBIo', 'classList',
'SENT.', 'Request\x20OTP', '11Pyyylr', 'json', 'success', 'E-mail\x20Verified.',
'/MAR/blsappointment/VerifyEmail', 'POST', '142315tqrTpC', '#657689', 'alert-
danger', 'style', 'remove', 'EmailCode', '24AxLzVD', 'add', 'value',
'7662480UCaCWR', 'getElementById', 'GET', 'innerText', '2440249yHLwTC',
'validation-summary', 'btnSenderificationCode', 'EmailVerified', 'Code', 'Your\
x20session\x20has\x20been\x20expired.\x20Please\x20Refresh-it.', '33023930ibtAlt',
'SENDING...', 'block', 'alert-success', '8507046pOciwt', 'img',
'getElementsByClassName', '22oJPKiw', '20832GvZHtX', 'error',
'EmailVerificationCode', 'onclick', 'addEventListener', 'click', 'An\x20OTP\x20has\
x20been\x20sent\x20on\x20your\x20registered\x20e-mail\x20ID.']; a = function ()
{ return r; }; return a(); } let requestButton = document[k(0x167)](k(0x16c)),
verifyEmailButton = document[k(0x167)]('btnVerifyEmail'), errorElement =
document[k(0x176)](k(0x16b))[k(0x189)](0x0); requestButton[k(0x160)][k(0x180)] =
'#657689', verifyEmailButton['style']['backgroundColor'] = k(0x196),
requestButton[k(0x184)](k(0x17b)), verifyEmailButton[k(0x184)]('onclick'),
requestButton['textContent'] = k(0x18e), verifyEmailButton[k(0x18a)] = 'Verify\
x20OTP', requestButton[k(0x17c)](k(0x17d), function () { const l = k;
requestButton[l(0x18a)] = l(0x171), requestOtp(); }),
verifyEmailButton['addEventListener']('click', function () { const m = k;
verifyEmailButton[m(0x18a)] = m(0x17f), verifyEmail(); }); function requestOtp()
{ const n = k; let c = new RegExp('\x5c?code\x5c=(.*?)\x22', n(0x175))[n(0x183)]
(document[n(0x182)]['innerHTML'])?.[0x1]?.[n(0x181)]() || null; if (!c) return
errorElement[n(0x160)]['display'] = n(0x172), errorElement['classList']['remove']
(n(0x173)), errorElement['classList'][n(0x164)](n(0x197)), errorElement[n(0x169)] =
'Can\x27t\x20find\x20Email\x20Code,\x20please\x20refresh\x20Page', ![]; $[n(0x187)]
({ 'type': n(0x168), 'url': n(0x186) + c, 'dataType': 'json', 'success': function
(d) { const o = n; errorElement[o(0x160)][o(0x185)] = 'block'; if (d[o(0x191)])
requestButton[o(0x18a)] = o(0x18d), errorElement[o(0x18c)]['remove'](o(0x197)),
errorElement[o(0x18c)][o(0x164)](o(0x173)), errorElement[o(0x169)] = o(0x17e); else
{ if (d['sessionExpired']) return errorElement[o(0x169)] = o(0x16f),
errorElement[o(0x18c)][o(0x161)](o(0x173)), errorElement[o(0x18c)][o(0x164)]
(o(0x197)), ![]; } } }); } function verifyEmail() { const p = k; let d =
document[p(0x167)](p(0x162))?.[p(0x165)], e = document['getElementById']
(p(0x17a))?.[p(0x165)], f = document[p(0x167)]('Id')?.['value']; const g = {};
g[p(0x16e)] = e, g['Value'] = d, g['Id'] = f; var h = g; $[p(0x187)]({ 'type':
p(0x194), 'url': p(0x193), 'dataType': p(0x190), 'data': h, 'success': function (i)
{ const q = p; if (i[q(0x191)]) verifyEmailButton[q(0x18a)] = q(0x192),
errorElement[q(0x18c)]['remove']('alert-danger'), errorElement[q(0x18c)][q(0x164)]
(q(0x173)), errorElement[q(0x169)] = q(0x192), document[q(0x167)](q(0x16d))
['value'] = 'True'; else return errorElement[q(0x169)] = i[q(0x179)],
errorElement[q(0x18c)][q(0x161)](q(0x173)), errorElement[q(0x18c)][q(0x164)]
(q(0x197)), ![]; } }); }
//
function check() {
unsafeWindow.ShowCommonModal = undefined;
$(".preloader").remove();
$('#global-overlay').hide();
$(document).ready(function () { OnUserConsentAccept(); })
$('#scamAlert').remove();
if ($('#DateCss').length != 0) {
var all = document.getElementById('DateCss').textContent;
if (all.includes('success')) {
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(4));
window.speechSynthesis.speak(MsgTxt);
clearInterval(dddd);
if (localStorage.getItem('dateSelectValue') != 0) { choose(); }
} else {
document.querySelector(`#${slo}`).style.backgroundColor =
'#f14242';
document.querySelector(`#${slo}`).placeholder = 'By Skynet';
if (document.getElementById('DateCss').textContent == '\n')
{ document.querySelector(`#${slo}`).style.backgroundColor = '#fd2300'; }
}
}
}
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').remove()
$("#EmailVerified").val('True');
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: "/MAR/query/UploadProfileImage", type: 'post', data: fd,
contentType: false, processData: false, success: function (result) {
if (result.success) {
$("#uploadfile-1-preview").attr("src",
"/MAR/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()
}