Automated Omegle Script

Script for omegle with automated features.

Verzia zo dňa 16.12.2015. Pozri najnovšiu verziu.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

// ==UserScript==
// @name        Automated Omegle Script
// @namespace   lazi3b0y
// @include     http://*.omegle.com/*
// @version     1
// @grant       GM_addStyle
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @description Script for omegle with automated features.
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);

GM_addStyle(
  "td.chatmsgcell { width: 50%; }" +
  "#omegle-greetings-text-in-chat { width: 100%; bkacground: #FFF none repeat scroll 0% 0%; font-family: sans-serif; border: 0px none; padding: 0px; margin: 0px; height: 4.5em; font-size: 1em; overflow: auto; border-radius: 0px; resize: none; }" +
  "#omegle-greetings-text-start { position: fixed; top: 105px; left: 5px; width: 245px; height: 475px; resize: none; }" +
  ".greetingsmsgcell { width: 50%; }" +
  ".greetingsmsgwrapper { background: #FFF none repeat scroll 0% 0%; border: 1px solid #CCC; height: 4.5em; padding: 0.25em; }" +
  ".checkboxwrapper { position: fixed; line-height: 12px; padding: 2px;  }" +
  ".activate-text { position: fixed; display: inline-block; font-size: 11px; }" +
"");

var greetingsText;
var greeted = false;
var ABORTS=[
  'You have disconnected.',
  'Stranger has disconnected',
];

$('body').append('<textarea id="omegle-greetings-text-start" placeholder="Automated greeting goes here." />');
$('body').append('<div class="checkboxwrapper" style="top: 85px; left: 1px;"><input id="omegle-enabled" type="checkbox" checked /></div><div class="activate-text" style="top: 90px; left: 22px;">Activate auto script</div>');
$('#omegle-enabled').prop('checked', false);

function disconnect() {
  $('button.disconnectbtn').click();
  greeted = false;
};

setInterval(function() {
  var activationText = $('.activate-text');
  var checkBoxWrapper = $('.checkboxwrapper');
  var checkBox = $('#omegle-enabled');
  
  
  if ($( 'body:containsIN("What do you wanna talk about?")' ).text() && $('#omegle-greetings-text-start').length === 0) {
    $('#omegle-greetings-text-in-chat').remove();
    checkBoxWrapper.css({ 'top': '85px', 'left': '1px' });
    activationText.css({ 'top': '90px', 'left': '22px' });
    $('body').append('<textarea id="omegle-greetings-text-start" placeholder="Automated greeting goes here." />');
    $('#omegle-greetings-text-start').val(greetingsText);
    return;
  } else if ( !$( 'body:containsIN("What do you wanna talk about?")' ).text() && $('#omegle-greetings-text-in-chat').length === 0 ){
    $('#omegle-greetings-text-start').remove();
    checkBoxWrapper.css({ 'top': '70px', 'left': '3px' });
    activationText.css({ 'top': '75px', 'left': '25px' });
    $('td.chatmsgcell').after('<td class="greetingsmsgcell"><div class="greetingsmsgwrapper"><textarea id="omegle-greetings-text-in-chat" placeholder="Automated greeting goes here." /></div></td>');
    $('#omegle-greetings-text-in-chat').val(greetingsText);
  }

  if ($('#omegle-greetings-text-start').length > 0) {
    greetingsText = $('#omegle-greetings-text-start').val();
  } else if ($('#omegle-greetings-text-in-chat').length > 0) {
    greetingsText = $('#omegle-greetings-text-in-chat').val();
  }

  if (!checkBox[0].checked || $( 'body:containsIN("Connecting to server")' ).text() || $( 'body:containsIN("Start chatting")' ).text()) {
    return
  }

  if (greeted === false && $( "body:containsIN('You're now chatting with a random stranger. Say hi!')" ).text() ) {
    greeted = true;
    $('textarea.chatmsg ').val(greetingsText);
    $('button.sendbtn').click();
  }

  for (i=0;i<ABORTS.length;i++){
    if ($( 'body:containsIN("' + ABORTS[i] + '")' ).text()){
      disconnect();
      return;
    }
  }
}, 100);

$.extend($.expr[":"], {
  "containsIN": function(elem, i, match, array) {
   return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
  }
});