49 0 25KB
// ==UserScript== // @name Telegram mar lakhra // @namespace http://tampermonkey.net/ // @version 2,9 // @author TouiMi // @match https://www.blsspainmorocco.net/*/blsAppointment/ManageAppointment* // @downloadURL none // ==/UserScript== 'use strict'; /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/ /*$$ IMAGES LINKS $$ IMAGES LINKS $$*/ /*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/ const IMages = [{ BOUKARSOUHANANE : 'https://i.postimg.cc/tCsj1Zvw/kkk.jpg',// ABDELHAKELAMERANI : 'https://i.postimg.cc/v8xQy0df/Nouvelle-image-bitmap.jpg',// ALOUANABDELMAJID : 'https://i.postimg.cc/W4mD2k4v/bolhy.jpg',// ABDESLAMRACHDI : 'https://i.postimg.cc/FKf4pt2n/Whats-App-Image-2023-07-09-22-4916.jpg',// AOUATIFAOURAG : 'https://i.postimg.cc/wvQgy5K6/i.jpg',// HAFIDAASSALHI : 'https://i.postimg.cc/0Q2Hn7M5/Whats-App-Image-2023-06-26-08-3000.jpg',// AHMEDBENALI : 'https://i.postimg.cc/4yPYR7X3/3333.jpg',// ELAYACHIMOBARIK : 'https://i.postimg.cc/ydVB4fxF/uyyy.jpg',// RACHIDELYAAKOUBI : 'https://i.postimg.cc/tCrzh7Fy/yhhhhff.jpg',// MOHAMEDELJILALI : 'https://i.postimg.cc/13rVpjkF/gbgbg.jpg',// OWAYSTAIEBI : 'https://i.postimg.cc/ydvTvN2F/nai.jpg',// NOUREDDINEELYAAKOUBI : 'https://i.postimg.cc/8CsWNbYr/ouufdb.jpg',// RACHIDRACHDI : 'https://i.postimg.cc/wvfG3Fx8/pooij.jpg',// MOHAMMADIAZAUAGH : 'https://i.postimg.cc/9FKK2x0v/ouuuu.jpg',// MOHAMMADIAZAUAGH : 'https://i.postimg.cc/9FKK2x0v/ouuuu.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 $("#slot-footer-template").html(), height: 500
}); var familyElement = document.querySelector('.card-body');
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.kitem:contains('Premium')`).click();} isToggled = !isToggled; LoadAppointmentDates(ttt.slice(15),slo.slice(15));}); toggleButton.style= 'border-radius: 8px; margin-left : 7px;color : red; fontweight:bold ;' let sty ='font-weight:bold ; color:red; margin-left : 7px;' var select = document.createElement('select'); select.id = 'ville-select'; select.style='border-radius: 6px;cursor: pointer;'
var labell = document.createElement('label'); var dateSelect = document.createElement('input'); dateSelect.type = 'number'; dateSelect.id = 'dateSelect'; dateSelect.style= 'border-radius: 6px;cursor: pointer;' dateSelect.style.width = '40px'; dateSelect.style.marginLeft = '50px'; dateSelect.min = 0; // spécifier la valeur minimale autorisée dateSelect.max = 20; // spécifier la valeur maximale autorisée var dateSelectLabel = document.createElement('span'); labell.id = 'labell'; dateSelectLabel.style = sty; dateSelectLabel.id = 'day'; dateSelectLabel.textContent = ': Day To Select'; labell.prepend(dateSelectLabel); labell.prepend(dateSelect); familyElement.prepend(labell); var dateSelectValue = localStorage.getItem('dateSelectValue') || 0; dateSelect.addEventListener('change', function() {
if($('#dateSelect').val()==0){document.getElementById('day').style.color = 'red';}else{document.getElementById('day').style.color = 'green';} var value = this.value; localStorage.setItem('dateSelectValue', value);}); if (dateSelectValue) {dateSelect.value = dateSelectValue;} if($('#dateSelect').val()!=0){document.getElementById('day').style.color = 'green';} var options = ['Tangier', 'Casablanca', 'Agadir', 'Tetouan', 'Nador', 'Rabat']; for (var i = 0; i < options.length; i++) { var option = document.createElement('option'); option.value = options[i]; option.text = options[i]; select.appendChild(option);} var ville = localStorage.getItem('ville') || 'Tangier'; select.value = ville; select.addEventListener('change', function() { ville = this.value; localStorage.setItem('ville', ville); $(`li.k-item:contains(${ville})`).click(); LoadAppointmentDates(ttt.slice(15),slo.slice(15));}); var titleElement = document.querySelector('#appointmentDetailsDiv .card-headertitle'); var linkElement = document.createElement('a'); linkElement.setAttribute('target', '_blank'); linkElement.href = 'htt'+'ps://t'+'.me/D'+ 'ev'+'Te'+'am'+"Scripts";linkElement.style.color = "blue"; linkElement.textContent = 'Script B'+'L'+ 'S B'+'y De'+'vT' +'ea'+'m';titleElement.innerHTML = ''; 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'; function change() {LoadAppointmentDates(ttt.slice(15),slo.slice(15));} var label = document.createElement('label'); var auto = localStorage.getItem('auto') === 'true'; var checkboxWrapper = document.createElement('div'); familyElement.prepend(label); familyElement.prepend(toggleButton); familyElement.prepend(checkboxxx); familyElement.prepend(select); var day = localStorage.getItem('dateSelectValue')-1;
var dddd = setInterval(check, 500); var cou = 0;var cc = 0; 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('#LocationIdlist .k-state-selected').textContent; var typ = document.querySelector('.k-list-scroller .kstate-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); clearInterval(dddd); 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() { var timm = setInterval(sss, 300); var tim = setInterval(ss, 100); function sss() { $(`#${slo}`).click() var all = document.getElementById('DateCss').textContent; var dd = all.indexOf("{background-color: var(--bs-success)"); var touii = all.slice(0, dd); const regex = /data-value="(\d{4}\/\d{1,2}\/\d{1,2})"/g; var libre = [];let match; while (match = regex.exec(touii)) {libre.push(match[1]);} if($(`.k-calendar-view a[data-value="${libre[day]}"]`).length < 1 ){ $(".k-icon.k-i-arrow-60-right").click();$(`.k-calendar-view a[data-value="$ {libre[5]}"]`).click(); }else{$(`.k-calendar-view a[data-value="${libre[day]}"]`).click();}} 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'); var randomNumber = Math.floor(Math.random() * 1000000);$ ("#EmailVerificationCode").val(randomNumber); 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()}