// ==UserScript==
// @name        NewJob1$
// @namespace   NewJob1$
// @description Chat Items
// @include     https://acs.projectdublin.com/conversation.html?conversation_id=*
// @version     1
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant       GM_xmlhttpRequest
// @connect     harinionlinejobs.in
// ==/UserScript==

var callOnce ='';
if(callOnce == '') { callOnce='1'; setTimeout(function(){  callgm(); }, 3000); }

var url2 = new URL(window.location);
var hitid = url2.searchParams.get("hitId");

function callgm(){

//var message = $('.conversation-content').html();
var message = document.getElementsByClassName("conversation-content")[0].innerHTML;

//alert(message);

GM_xmlhttpRequest({
method: "POST",
dataType: 'json',
url: "http://harinionlinejobs.in/GM_conversion/jsclient.php",
data: "message="+encodeURIComponent(message)+"&hitid="+hitid,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
        onload: function(response) {

         //   console.log(response.response);


if(response.response=='New Record inserted successfully waiting for response...') { 

console.log(response.response);
setTimeout(function(){ callgm(); }, 6000);
}
else if(response.response=='Waiting') { 

console.log(response.response);
setTimeout(function(){ callgm(); }, 6000);
}
else
{

$data=JSON.parse(response.response);
console.log($data[0].answer);
document.getElementById("conversation-input-text").value = $data[0].answer;

$('#user-send-statement').attr('disabled',false);


GM_xmlhttpRequest({
method: "GET",
dataType: 'json',
url: "http://harinionlinejobs.in/GM_conversion/empty.php?hitid="+hitid,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
onload: function(response) {
console.log("Live Status Updated 2!!");
}
});

setTimeout(function(){ $('#user-send-statement').click(); }, 2000);
setTimeout(function(){ callgm(); }, 6000);

}

       }

 });


}

I WANT TO PURCHASE INTERNET SORRY