// ==UserScript==
// @name infovisa tls france 1
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://fr.tlscontact.com/appointment/ma/maAGA2fr/15988956
// @match https://fr.tlscontact.com/formGroup/ma/maCAS2fr
// @match https://fr.tlscontact.com/visa/ma
// @match https://fr.tlscontact.com/welcome/ma/maCAS2fr
// @match https://visas-fr.tlscontact.com/formGroup/ma/maAGA2fr
// @match https://it.tlscontact.com/ma/CAS*
// @match https://visa-fr.tlscontact.com/*
// @include https://*.tlscontact.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tlscontact.com
// @icon
data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 2024-06-09
// @description try to take over the world!
// @author You
// @match https://fr.tlscontact.com/appointment/ma/maAGA2fr/15988956
// @icon https://www.google.com/s2/favicons?sz=64&domain=tlscontact.com
// @grant none
// ==/UserScript==
// url to table
// url to table
console.log("Begin work")
var sc=document.createElement('div');
sc.innerHTML='<div style="padding:20px;position:fixed;z-
index:99999;top:0px;left:0px;background-color:white;">Starting.</div>';
document.body.appendChild(sc);
if(window.location.href.includes(".tlscontact.com/appointment/")){
sc.innerHTML='<div style="padding:20px;position:fixed;z-
index:99999;top:0px;left:0px;background-color:red;">Searching........</div>';
document.body.appendChild(sc);
}
// url to table
setTimeout(function(){
var load = document.getElementsByClassName('vld-overlay is-active is-full-page')
var my = setInterval(function() {
if(document.getElementsByClassName('-available').length>0){
sc.innerHTML='<div style="padding:20px;position:fixed;z-
index:99999;top:0px;left:0px;background-color:red;">Searching........</div>';
document.body.appendChild(sc);
work()
clearInterval(my)
}
if(load[0].style.display == 'none'){
popup()
clearInterval(my)
}
}, 100);
}, 100);
function popup(){
var popup = document.getElementsByClassName('tls-popup')
//var btnC = document.getElementsByClassName('tls-button-primary -uppercase')
if(popup[0].innerText =="×\nDésolé, il n'y a pas de rendez-vous disponible pour
le moment, veuillez vérifier plus tard.\nCONFIRMER"){
window.setTimeout(function(){ location.reload(); }, 110*1000)
}else{
if(document.getElementsByClassName('-available').length>0){
//document.getElementsByClassName('-available')[0].click();
var half = parseInt((document.getElementsByClassName('-available').length
- 1)/2)
document.getElementsByClassName('-available')[half].click();
var btnConfirm = document.getElementsByClassName('tls-button-primary -
uppercase')
btnConfirm[0].click()
}
}
}
function work(){
if(document.getElementsByClassName('-available').length>0){
sc.innerHTML='<div style="padding:20px;position:fixed;z-
index:99999;top:0px;left:0px;background-color:red;">Searching........</div>';
document.body.appendChild(sc);
//document.getElementsByClassName('-available')[0].click();
var half = parseInt((document.getElementsByClassName('-available').length -
1)/2)
document.getElementsByClassName('-available')[half].click();
var btnConfirm = document.getElementsByClassName('tls-button-primary -
uppercase')
btnConfirm[0].click()
window.open("https://soundbible.com/grab.php?id=1937&type=mp3");
setTimeout(function(){
var btnConfirm1 = document.getElementsByClassName('tls-button-primary -
uppercase')
btnConfirm1[0].click()
}, 100);
}
}