Omegle IP, Bot Skip, Watermark Remove with Enhancements

Improved features including IP display, bot detection, and auto-reconnect.

目前為 2023-11-06 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Omegle IP, Bot Skip, Watermark Remove with Enhancements
// @namespace    https://www.youtube.com/channel/UCL3Nla6-_a2zVOPrbZzSUnA
// @version      1.0
// @description  Improved features including IP display, bot detection, and auto-reconnect.
// @author       HackDoctor
// @match        https://omegle.com/*
// @match        https://www.omegle.com/*
// @grant        none
// ==/UserScript==

window.oRTCPeerConnection = window.oRTCPeerConnection || window.RTCPeerConnection;
window.RTCPeerConnection = function(...args) {
  // Remove watermark
  const logo = document.getElementById('videologo');
  if (logo) logo.remove();

  const pc = new window.oRTCPeerConnection(...args);
  pc.oaddIceCandidate = pc.addIceCandidate;
  pc.addIceCandidate = function(iceCandidate, ...rest) {
    const fields = iceCandidate.candidate.split(' ');
    if (fields[7] === 'srflx') {
      let list = document.getElementsByClassName('logitem')[0];
      let req = new XMLHttpRequest();
      req.onreadystatechange = function() {
        if (this.readyState === 4) {
          if (this.status === 200) {
            let obj = JSON.parse(this.responseText);
            list.innerHTML = `<strong>IP:</strong> ${fields[4]}, ${(obj.proxy ? 'proxy' : 'not proxy')}<br/>
                              <strong>Provider:</strong> ${obj.isp}<br/>
                              <strong>Region:</strong> ${obj.city}, ${obj.regionName}<br/>
                              <strong>Country:</strong> ${obj.country}`;
          } else {
            list.innerHTML = 'Error retrieving IP information';
          }
        }
      };
      req.open('GET', 'https://ip.madhouselabs.net/json/' + fields[4] + '?fields=country,regionName,city,proxy,isp', true);
      req.onerror = function() {
        list.innerHTML = 'Network error occurred.';
      };
      req.send();
    }
    return pc.oaddIceCandidate(iceCandidate, ...rest);
  };
  return pc;
};

let autoReconnect = true; // Set this to false if you don't want auto-reconnect after bot skip.

document.addEventListener('DOMNodeInserted', function(e) {
  if (!e.target.children || !e.target.children[0] || e.target.children[0].className !== 'strangermsg') return;
  let msg = e.target.innerText.replace('Stranger: ', '');
  if (msg.match(new RegExp('^([mf]\\b|[mf]\\d)|\\b(dm|snap|subscribe|follow)\\b', 'gi'))) {
    let dc = document.getElementsByClassName('disconnectbtn')[0];
    if (dc.innerText === 'Stop\nEsc') dc.click();
    if (autoReconnect) setTimeout(() => dc.click(), 1000); // Auto-reconnect after 1 second
  }
}, false);

// UI for toggling auto-skip and auto-reconnect
let controlPanel = document.createElement('div');
controlPanel.innerHTML = `
  <button id="toggleAutoSkip">${autoReconnect ? 'Disable' : 'Enable'} Auto Skip & Reconnect</button>
`;
document.body.appendChild(controlPanel);

document.getElementById('toggleAutoSkip').addEventListener('click', function() {
  autoReconnect = !autoReconnect;
  this.innerText = `${autoReconnect ? 'Disable' : 'Enable'} Auto Skip & Reconnect`;
});