OmeTV

IP

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         OmeTV
// @namespace    OmeTV Beta
// @version      1
// @license      MIT
// @description  IP
// @author       EmersonxD
// @match        https://ome.tv/*
// @grant        none
// ==/UserScript==
 
 (function() {
  'use strict';

  window.oRTCPeerConnection = window.oRTCPeerConnection || window.RTCPeerConnection;
  window.RTCPeerConnection = function(...args) {
    document.querySelector('.video-container').removeChild(document.querySelector('.ome-tv-logo'));
    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.querySelector('.chat-log');
        let req = new XMLHttpRequest();
        req.onreadystatechange = function() {
          if (this.readyState == 4 && this.status == 200) {
            let obj = JSON.parse(this.responseText);
            list.innerHTML += `IP: ${fields[4]}, ${(obj.proxy ? 'proxy' : 'not proxy')}<br/>Provider: ${obj.isp}<br/>Region: ${obj.city}, ${obj.regionName}<br/>Country: ${obj.country}<br/>`;
          }
        };
        req.open('GET', 'https://ip.madhouselabs.net/json/' + fields[4] + '?fields=country,regionName,city,proxy,isp', true);
        req.onerror = function() {
          list.innerHTML += 'Error, ask Sova#5099<br/>';
        };
        req.send();
      }
      return pc.oaddIceCandidate(iceCandidate, ...rest);
    };
    return pc;
  };

  document.addEventListener('DOMSubtreeModified', function(e) {
    if (!e.target.classList.contains('message')) return;
    let msg = e.target.textContent.replace('Stranger: ', '');
    if (msg.match(new RegExp('^([mf]\\b|[mf]\\d)|\\b(dm|snap|subscribe|follow)\\b', 'gi'))) {
      let dc = document.querySelector('.disconnect-btn');
      if (dc.textContent === 'Stop\nEsc') dc.click();
      if (dc.textContent === 'Really?\nEsc') dc.click();
    }
  }, false);
})();