« Back to full topics list
0
0

hi
i have a small problem
in this script you can take appointment auto in web site tlscontact but i need take appointment but without confirmation message
take appointment directly

// ==UserScript==
// @name TLS MOZILA TALI
// @namespace Violentmonkey Scripts
// @match https://fr.tlscontact.com/dz/ORN/myapp.php**
// @grant none
// ==/UserScript==
var i,x,j,pureText,realI,realJ;
x=0;
window.setTimeout(function(){ if(x==0){location.reload();} }, 10*1000);

var all_dates = document.getElementsByClassName(“take_appointment”)[0].getElementsByTagName(“ul”)[0].getElementsByTagName(“li”);

for (i = 0; i < all_dates.length; i++) {
var times = all_dates[i].getElementsByTagName("a");

for( j = 0 ; j<times.length;j++) {

var dispo = times[j];
var inner = dispo.className;
if(inner!="full") {
x=1;
pureText = dispo.innerHTML;
realI=i;
realJ=j;

}
}
}

if(x==1) {
all_dates[realI].getElementsByTagName("a")[realJ].click();
}

//Starts here
setInterval (function (){
if(document.getElementById("ajaxConfirmCall_submit")!=null)
{//My work is done here
document.getElementById("ajaxConfirmCall_submit").click();
}

},3000);

see this video https://www.youtube.com/watch?v=nt2eVq5LKh8

ANSWERED
Marked as spam
Posted by - Asked on August 30, 2018 10:44 am - 285 views

1 Replies

0
Private reply

Hello, I think that this question belongs to a JavaScript forum. So I suggest you post it in the right forum so that you can get a timely answer for it.

Marked as spam
Posted by - Replied on September 26, 2018 2:28 pm