Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onerror = function(a, b, c) {
- "undefined" === typeof _gaq && (_gaq = []);
- _gaq.push(["_trackEvent", "JSerror", b + ":" + c, a + ""])
- };
- top.location != document.location && (top.location.href = document.location.href);
- var doStartFlash = 0.5 > Math.random(),
- IE_URL_MAX_LENGTH = 2E3;
- "undefined" === typeof IS_MOBILE && (IS_MOBILE = !1);
- var splitDomain = document.domain.split(".");
- 1 < splitDomain.length && (document.domain = splitDomain[splitDomain.length - 2] + "." + splitDomain[splitDomain.length - 1]);
- var collegeJustEnabled = !1;
- "#dormon" === window.location.hash && (collegeJustEnabled = !0, window.location.hash = "#", window.location.hash = "");
- var aurrp = Cookie.read("aurrp"),
- aurrp = null === aurrp ? !0 : "1" === aurrp,
- shouldUseLikes = Cookie.read("uselikes"),
- shouldUseLikes = null === shouldUseLikes ? !0 : "1" === shouldUseLikes,
- shouldUseEnglish = Cookie.read("useenglish"),
- shouldUseEnglish = null === shouldUseEnglish ? !1 : "1" === shouldUseEnglish,
- randID = Cookie.read("randid");
- if (!randID || 8 !== randID.length) randID = function() {
- for (var a = "", b = 0; 8 > b; b++) var c = Math.floor(32 * Math.random()),
- a = a + "23456789ABCDEFGHJKLMNPQRSTUVWXYZ".charAt(c);
- return a
- }();
- Cookie.write("randid", randID, {
- duration: 365,
- domain: document.domain,
- path: "/"
- });
- var collegeAndAuth = Cookie.read("college");
- if (collegeAndAuth) {
- if (Cookie.write("college", collegeAndAuth, {
- duration: 365,
- domain: document.domain,
- path: "/"
- }), collegeAndAuth = JSON.decode(collegeAndAuth), "object" !== typeof collegeAndAuth || null === collegeAndAuth || 2 !== collegeAndAuth.length) collegeAndAuth = null
- } else collegeAndAuth = null;
- var collegeMode = Cookie.read("collegemode");
- "my" !== collegeMode && ("any" !== collegeMode && "none" !== collegeMode) && (collegeMode = "any");
- function setCollegeMode(a) {
- collegeMode = a;
- Cookie.write("collegemode", collegeMode, {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- }
- function clearCollegeSetting() {
- Cookie.write("college", "", {
- duration: 365,
- domain: document.domain,
- path: "/"
- });
- Cookie.write("collegemode", "", {
- duration: 365,
- domain: document.domain,
- path: "/"
- });
- collegeAndAuth = null;
- collegeMode = "any"
- }
- var shouldUseFbLikes, firstChatTrackCode = null,
- contentTop, logoElt, likeButtonElement = null,
- newChatButton = new Element("img", {
- width: 170,
- height: 50,
- alt: "New chat",
- styles: {
- cursor: "pointer",
- "vertical-align": "middle"
- }
- });
- window.devicePixelRatio && 1 < window.devicePixelRatio ? newChatButton.set("src", "/static/newchatbtn@2x.png") : newChatButton.set("src", "/static/newchatbtn.png");
- var unmonSexyButton = null,
- unmonGayButton = null;
- if (IS_MOBILE) {
- var bwLogo = new Element("img", {
- width: 77,
- height: 16,
- alt: ""
- });
- window.devicePixelRatio && 1 < window.devicePixelRatio ? bwLogo.set("src", "/static/bwlogo@2x.png") : bwLogo.set("src", "/static/bwlogo.png")
- }
- var COMETBackend = new Class({
- Implements: [Options, Events],
- initialize: function(a) {
- this.setOptions(a);
- this.clientID = null;
- this.stopped = !1
- },
- connect: function(a, b, c, d, e, f, i, g, m, r, u, l, s, Q) {
- var j = this;
- j.server = a;
- j.stratusNearID = b;
- j.askedQuestion = c;
- j.wantsSpy = d;
- j.canSaveQuestion = e;
- j.fbAccessToken = f;
- j.topics = i;
- j.group = g;
- j.lang = m;
- j.camera = r;
- j.enableWebRTC = u;
- j.college = l;
- j.collegeAuth = s;
- j.anyCollege = Q;
- subdomainManager.subdomainWindow(a, function(a) {
- j.reqWindow = a;
- j.gotReqWindow()
- })
- },
- resume: function(a, b) {
- var c = this;
- c.server = a;
- c.clientID = b;
- subdomainManager.subdomainWindow(a, function(a) {
- c.reqWindow = a;
- c.getEvents()
- })
- },
- gotReqWindow: function() {
- var a = this,
- b = subdomainManager.fixUrl(a.server, "/start?rcs=1&firstevents=1&spid=" + (a.stratusNearID || "") + "&randid=" + randID + (IS_MOBILE ? "&m=1" : ""));
- "string" === typeof a.askedQuestion && (b += "&ask=" + encodeURIComponent(a.askedQuestion));
- "string" === typeof a.fbAccessToken && (b += "&fbaccesstoken=" + encodeURIComponent(a.fbAccessToken));
- a.wantsSpy && (b += "&wantsspy=1");
- a.canSaveQuestion && (b +=
- "&cansavequestion=1");
- a.topics && a.topics.length && (b += "&topics=" + encodeURIComponent(JSON.encode(a.topics)));
- a.group && (b += "&group=" + encodeURIComponent(a.group));
- a.lang && (b += "&lang=" + encodeURIComponent(a.lang));
- a.camera && (b += "&camera=" + encodeURIComponent(a.camera));
- a.enableWebRTC && (b += "&webrtc=1");
- a.college && (b += "&college=" + encodeURIComponent(a.college));
- a.collegeAuth && (b += "&college_auth=" + encodeURIComponent(a.collegeAuth));
- a.anyCollege && (b += "&any_college=1");
- var c = null,
- d = killHeaders(new a.reqWindow.Request.JSON({
- url: b,
- onSuccess: function(b) {
- null !== c && (clearTimeout(c), c = null);
- b.clientID ? (a.clientID = b.clientID, a.fireEvent("connectedToServer"), b.events && a.gotEvents(b.events), a.getEvents()) : a.fireEvent("permanentlyFailedToConnect")
- },
- onFailure: function() {
- null !== c && (clearTimeout(c), c = null);
- a.fireEvent("failedToConnect")
- }
- })),
- c = setTimeout(function() {
- c = null;
- d.cancel();
- a.fireEvent("failedToConnect")
- }, 15E3);
- d.post()
- },
- getEvents: function(a) {
- void 0 === a && (a = 0);
- if (!this.stopped) {
- 2 < a && (this.fireEvent("connectionDied", "Lost contact with server, and couldn't reach it after 3 tries."),
- this.stopped = !0);
- var b = this,
- c = null,
- d = killHeaders(new b.reqWindow.Request.JSON({
- url: subdomainManager.fixUrl(b.server, "/events"),
- onSuccess: function(a) {
- null !== c && (clearTimeout(c), c = null);
- b.stopped || (null === a ? (b.stopped = !0, b.fireEvent("connectionPermanentlyDied", "Server was unreachable for too long and your connection was lost.")) : (b.gotEvents(a), b.getEvents()))
- },
- onFailure: function() {
- null !== c && (clearTimeout(c), c = null);
- setTimeout(function() {
- b.getEvents(a + 1)
- }, 2500)
- }
- }));
- d.post({
- id: this.clientID
- });
- c = setTimeout(function() {
- c =
- null;
- d.cancel();
- b.getEvents(a)
- }, 62E3)
- }
- },
- gotEvents: function(a) {
- var b = this;
- $each(a, function(a) {
- switch (a[0]) {
- case "waiting":
- b.fireEvent("waiting");
- break;
- case "connected":
- b.fireEvent("strangerConnected", a[1]);
- break;
- case "gotMessage":
- b.fireEvent("gotMessage", a[1]);
- break;
- case "strangerDisconnected":
- b.stopped = !0;
- b.fireEvent("strangerDisconnected");
- break;
- case "typing":
- b.fireEvent("typing");
- break;
- case "stoppedTyping":
- b.fireEvent("stoppedTyping");
- break;
- case "recaptchaRequired":
- b.fireEvent("recaptchaRequired",
- a[1]);
- break;
- case "recaptchaRejected":
- b.fireEvent("recaptchaRejected", a[1]);
- break;
- case "count":
- onlineCountUpdated(a[1]);
- break;
- case "spyMessage":
- b.fireEvent("spyMessage", [a[1], a[2]]);
- break;
- case "spyTyping":
- b.fireEvent("spyTyping", a[1]);
- break;
- case "spyStoppedTyping":
- b.fireEvent("spyStoppedTyping", a[1]);
- break;
- case "spyDisconnected":
- b.stopped = !0;
- b.fireEvent("spyDisconnected", a[1]);
- break;
- case "question":
- b.fireEvent("question", a[1]);
- break;
- case "serverMessage":
- b.fireEvent("serverMessage", a[1]);
- break;
- case "error":
- b.stopped = !0;
- b.fireEvent("error", a[1]);
- break;
- case "commonLikes":
- b.fireEvent("commonLikes", [a[1]]);
- break;
- case "antinudeBanned":
- b.stopped = !0;
- b.fireEvent("antinudeBanned", [a[1]]);
- break;
- case "statusInfo":
- gotServerStatus(a[1]);
- break;
- case "identDigests":
- b.fireEvent("identDigests", [a[1]]);
- break;
- case "icecandidate":
- b.fireEvent("icecandidate", [a[1]]);
- break;
- case "rtccall":
- b.fireEvent("rtccall");
- break;
- case "rtcpeerdescription":
- b.fireEvent("rtcpeerdescription", [a[1]]);
- break;
- case "partnerCollege":
- b.fireEvent("partnerCollege", [a[1]])
- }
- })
- },
- sendMessage: function(a) {
- this.sendPOST("/send", {
- msg: a
- })
- },
- typing: function() {
- this.sendPOST("/typing")
- },
- stopTyping: function() {
- this.sendPOST("/stoppedtyping")
- },
- submitRecaptcha: function(a, b) {
- this.sendPOST("/recaptcha", {
- challenge: a,
- response: b
- })
- },
- disconnect: function() {
- this.sendPOST("/disconnect");
- this.stopped = !0
- },
- stopLookingForCommonLikes: function() {
- this.sendPOST("/stoplookingforcommonlikes")
- },
- sendRTCPeerDescription: function(a) {
- this.sendPOST("/rtcpeerdescription", {
- desc: JSON.encode(a)
- })
- },
- sendICECandidates: function(a) {
- for (var b =
- "id=" + encodeURIComponent(this.clientID), c = 0; c < a.length; c++) b += "&candidate=" + encodeURIComponent(JSON.encode(a[c]));
- this.sendPOST("/icecandidate", b)
- },
- sendPOST: function(a, b, c) {
- b = b || {};
- c = c || 0;
- "object" === typeof b && (b.id = this.clientID);
- var d = this;
- killHeaders(new this.reqWindow.Request({
- url: subdomainManager.fixUrl(this.server, a),
- data: b,
- onFailure: function() {
- 3 > c && d.sendPOST(a, b, c + 1)
- }
- })).send()
- }
- }),
- flashCb_socketConnected, flashCb_socketGotPacket, flashCb_socketClosed, flashCb_socketError;
- function resetFlashSocketCallbacks() {
- flashCb_socketConnected = function() {};
- flashCb_socketGotPacket = function() {};
- flashCb_socketClosed = function() {};
- flashCb_socketError = function() {}
- }
- function parseQueryString(a) {
- for (var b = {}, a = a.split("&"), c = 0; c < a.length; c++) {
- var d = a[c].split("="),
- e = decodeURIComponent(d[0].replace(/\+/g, " ")),
- d = decodeURIComponent(d[1].replace(/\+/g, " "));
- b[e] = d
- }
- return b
- }
- function middotify(a) {
- for (var b = new Element("span"), c = 0; c < a.length; c++) 0 < c && b.appendText(" \u2022\u00a0"), b.grab(a[c]);
- return b
- }
- var flashSocketsWillWork = "yes" === Cookie.read("flashsocketswork"),
- flashSocketsWork = !1;
- function setFlashSocketsWorkCookie() {
- Cookie.write("flashsocketswork", "yes", {
- duration: 1 / 12,
- domain: document.domain,
- path: "/"
- })
- }
- function flashCb_socketsWork() {
- flashSocketsWork = !0;
- setFlashSocketsWorkCookie()
- }
- var MetaBackend = new Class({
- Implements: [Options, Events],
- initialize: function(a) {
- this.setOptions(a);
- this.numResumes = 0;
- this.stopped = !1;
- this.server = null
- },
- plugInBackend: function() {
- var a = this;
- $each("connectedToServer waiting strangerConnected gotMessage strangerDisconnected typing stoppedTyping recaptchaRequired gotMessageHTML recaptchaRejected spyMessage spyTyping spyStoppedTyping spyDisconnected question error commonLikes antinudeBanned serverMessage identDigests icecandidate rtccall rtcpeerdescription partnerCollege".split(" "),
- function(b) {
- a.backend.addEvent(b, function() {
- if ("strangerDisconnected" === b || "error" === b || "spyDisconnected" === b || "antinudeBanned" === b) a.stopped = a.backend.stopped;
- a.fireEvent(b, arguments)
- })
- });
- a.backend.addEvent("connectionDied", function() {
- serverManager.unsetKnownGood();
- if (a.backend.clientID && 3 > a.numResumes && !a.stopped) {
- a.numResumes++;
- var b = a.backend.clientID;
- a.backend.removeEvents();
- a.backend = new COMETBackend;
- a.plugInBackend();
- a.server = serverManager.pickServer();
- a.backend.resume(a.server, b)
- } else a.stopped = !0, a.fireEvent("connectionDied", arguments)
- });
- a.backend.addEvent("connectionPermanentlyDied", function() {
- serverManager.unsetKnownGood();
- a.stopped = !0;
- a.fireEvent("connectionDied", arguments)
- });
- a.backend.addEvent("failedToConnect", function() {
- serverManager.unsetKnownGood();
- 3 > a.numResumes ? (a.numResumes++, a.backend.removeEvents(), a.connect.apply(a, a.connectArgs)) : (a.stopped = !0, a.fireEvent("failedToConnect", a.backend.server))
- });
- a.backend.addEvent("permanentlyFailedToConnect", function() {
- serverManager.unsetKnownGood();
- a.stopped = !0;
- a.fireEvent("failedToConnect", a.backend.server)
- })
- },
- connect: function() {
- this.backend = new COMETBackend;
- this.plugInBackend();
- this.server = serverManager.pickServer();
- this.connectArgs = arguments;
- for (var a = [this.server], b = 0; b < arguments.length; b++) a.push(arguments[b]);
- this.backend.connect.apply(this.backend, a)
- },
- sendMessage: function(a) {
- this.backend.sendMessage(a)
- },
- typing: function() {
- this.backend.typing()
- },
- stopTyping: function() {
- this.backend.stopTyping()
- },
- disconnect: function() {
- this.stopped = !0;
- this.backend &&
- this.backend.disconnect()
- },
- submitRecaptcha: function(a, b) {
- this.backend.submitRecaptcha(a, b)
- },
- stopLookingForCommonLikes: function() {
- this.backend.stopLookingForCommonLikes()
- },
- sendRTCPeerDescription: function(a) {
- this.backend.sendRTCPeerDescription(a)
- },
- sendICECandidates: function(a) {
- this.backend.sendICECandidates(a)
- }
- }),
- savedIntro = null,
- savedHeader = null;
- function startFirstChat(a, b, c, d, e) {
- IS_MOBILE ? (logoElt = $("logo"), savedHeader = $("header"), $("header").dispose(), contentTop = 0) : (contentTop = $("intro").offsetTop, $$("#headerappstore").setStyle("visibility", "visible"));
- firstChatTrackCode && ((new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=" + (e ? "unmon-" + (shouldForceUnmonitored ? "" : "not") + "forced-" : "mon-") + (a ? "videoy-" : "videon-") + encodeURIComponent(firstChatTrackCode));
- savedIntro = $("intro");
- $("google_translate_upper_container") && ($("google_translate_upper_container").grab &&
- $("google_translate_wrapper")) && $("google_translate_upper_container").grab($("google_translate_wrapper"));
- $("intro").dispose();
- for (var f = Array.prototype.slice.call(arguments); 5 > f.length;) f.push(void 0);
- f.push(!0);
- startNewChat.apply(null, f)
- }
- function showIntro() {
- savedHeader && !$("header") && (logoElt && savedHeader.grab(logoElt, "top"), $(document.body).grab(savedHeader));
- savedIntro && $(document.body).grab(savedIntro);
- if (IS_MOBILE)
- for (var a = 0; 300 >= a; a += 50) setTimeout(function() {
- scrollTo(0, 1)
- }, a);
- else $$("#headerappstore").setStyle("visibility", "hidden");
- mobileAdWrapper && $("mobileadwrapper2") && mobileAdWrapper.setStyles({
- display: "block",
- top: $("mobileadwrapper2").getPosition().y + "px"
- });
- a = makeTopicSettings(!0);
- $("topicsettingscontainer") && ($("topicsettingscontainer").empty(),
- $("topicsettingscontainer").grab(a))
- }
- function commify(a) {
- var b = "",
- c;
- do {
- c = (a % 1E3).toString();
- for (a = Math.floor(a / 1E3); 0 != a && 3 > c.length;) c = "0" + c;
- b = c + b;
- a && (b = "," + b)
- } while (0 != a);
- return b
- }
- function onlineCountUpdated(a) {
- var b = $("onlinecount");
- if (b && !(void 0 === a || null === a || isNaN(a))) a = 1E3 * Math.floor(a / 1E3), a = "<strong>" + commify(a) + "+</strong> online now", b.set("html", a)
- }
- function randomSpyMode() {
- return 0.25 > Math.random() ? "spy" : "spyee"
- }
- var idealSpyMode = randomSpyMode(),
- firstStatusUpdate = !0,
- antinudeServers = [],
- lastScreenshotTime = null,
- screenshotPercent = 0,
- shouldForceUnmonitored = !1;
- function forceUnmon() {
- if (!IS_MOBILE && !shouldForceUnmonitored) {
- shouldForceUnmonitored = !0;
- var a = $("intro") || savedIntro;
- if (a) {
- a.getElementById("monitoringnotice") && a.getElementById("monitoringnotice").dispose();
- var b = new Element("div", {
- id: "monitoringnotice"
- });
- a.getElementById("chattypes").grab(b, "before");
- b.addClass("banned");
- var c = new Element("p", {
- html: "Your computer/network is <strong>banned</strong> for possible bad behavior."
- }),
- d = new Element("p", {
- "class": "extrainfo",
- html: "<strong>You can still use Omegle</strong>, but only the unmonitored section. <strong>You must be 18 or older.</strong>"
- }),
- e = new Element("p", {
- "class": "extrainfo",
- html: "(If you didn't do anything wrong, sorry! Mistakes happen sometimes. Your ban won't last forever.)"
- });
- b.grab(c);
- b.grab(d);
- b.grab(e);
- a.getElements("#tryspymode, #intoheadercell, #topicsettingscell, #spymodebtn, #videobtnunmoderated").dispose();
- b = "/static/pornbtn";
- b = window.devicePixelRatio && 1 < window.devicePixelRatio ? b + "@2x.png?xx" : b + ".png?xx";
- c = new Element("img", {
- src: b,
- width: 124,
- height: 50,
- id: "girlsbtn"
- });
- b = new Element("td");
- b.grab(c);
- var f = firstChatTrackCode ?
- "-" + firstChatTrackCode : "";
- c.addEvent("click", function() {
- window.open("http://wawadmin.omegle.com/redir/y?track=homepage-ban" + f)
- });
- c = new Element("td", {
- "class": "chattypeorcell",
- text: "or"
- });
- d = "/static/gaybtnorange";
- d = window.devicePixelRatio && 1 < window.devicePixelRatio ? d + "@2x.png" : d + ".png";
- e = new Element("img", {
- src: d,
- width: 124,
- height: 50,
- id: "gaybtn"
- });
- d = new Element("td");
- d.grab(e);
- e.addEvent("click", function() {
- window.open("http://wawadmin.omegle.com/redir/gay?track=homepage-ban")
- });
- new Element("td", {
- "class": "chattypeorcell",
- text: "or"
- });
- e = new Element("tr");
- e.grab(b);
- e.grab(c);
- e.grab(d);
- a.getElement("#chattypes tbody").grab(e)
- }
- }
- }
- var serverStatusTimeout = null;
- function updateServerStatus() {
- serverStatusTimeout && (clearTimeout(serverStatusTimeout), serverStatusTimeout = null);
- var a = serverManager.pickServer();
- subdomainManager.subdomainWindow(a, function(b) {
- killHeaders(new b.Request.JSON({
- url: subdomainManager.fixUrl(a, "/status"),
- onSuccess: function(a) {
- gotServerStatus(a)
- },
- onFailure: function() {
- serverManager.unsetKnownGood();
- serverStatusTimeout = setTimeout(updateServerStatus, 1500)
- }
- })).get({
- nocache: Math.random(),
- randid: randID
- })
- })
- }
- var rtmfpServer = "rtmfp://p2p.rtmfp.net";
- function gotServerStatus(a) {
- serverStatusTimeout && (clearTimeout(serverStatusTimeout), serverStatusTimeout = null);
- onlineCountUpdated(a.count);
- idealSpyMode = 2 > a.spyQueueTime && 2 > a.spyeeQueueTime ? randomSpyMode() : a.spyQueueTime > a.spyeeQueueTime ? "spyee" : "spy";
- a.timestamp && timeManager.gotAccurateTime(new Date(1E3 * a.timestamp));
- a.servers && a.servers.length && serverManager.setServerList(a.servers);
- antinudeServers = a.antinudeservers || [];
- screenshotPercent = a.antinudepercent || 0;
- a.force_unmon && forceUnmon();
- firstStatusUpdate = !1;
- serverStatusTimeout = setTimeout(updateServerStatus, 9E4);
- a.rtmfp && a.rtmfp.length && (rtmfpServer = a.rtmfp)
- }
- function loadTumblrTags(a, b) {
- var c = serverManager.pickServer();
- subdomainManager.subdomainWindow(c, function(d) {
- killHeaders(new d.Request.JSON({
- url: subdomainManager.fixUrl(c, "/tumblr_tags"),
- onSuccess: function(a) {
- b(a)
- },
- onFailure: function() {
- b({
- success: !1,
- error: "Error reaching server."
- })
- }
- })).post({
- username: a
- })
- })
- }
- function processTumblrTags(a, b) {
- b || (b = 20);
- for (var c = [], d = {}, e = 0; e < a.length; e++) {
- var f = a[e],
- i = topicManager.normalize(f);
- d[i] ? (d[i].count++, f.length > d[i].format.length && (d[i].format = f)) : (d[i] = {
- count: 1,
- format: f
- }, c.push(i))
- }
- c.sort(function(a, b) {
- var c = d[a].count,
- e = d[b].count;
- if (c !== e) return e - c;
- c = Math.abs(a.length - 10);
- e = Math.abs(b.length - 10);
- return c - e
- });
- f = [];
- for (e = 0; e < Math.min(b, c.length); e++) f.push(d[c[e]].format);
- return f
- }
- function setShouldUseLikes(a) {
- shouldUseLikes = a;
- Cookie.write("uselikes", a ? "1" : "0", {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- }
- function setShouldUseEnglish(a) {
- shouldUseEnglish = a;
- Cookie.write("useenglish", a ? "1" : "0", {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- }
- function makeShouldUseLikesCheckbox() {
- var a = new Element("label"),
- b = new Element("input", {
- type: "checkbox",
- checked: shouldUseLikes,
- "class": "shoulduselikescheckbox"
- });
- b.addEvent("change", function() {
- setShouldUseLikes(b.checked)
- });
- a.grab(b);
- a.appendText(" Find strangers with common interests");
- return a
- }
- function makeCollegeCheckboxes(a) {
- var b = new Element("div");
- if (a) {
- var c = new Element("div");
- c.setStyle("font-weight", "bold");
- c.set("text", "College: ");
- c.appendText(collegeAndAuth[0]);
- c.appendText(" ");
- c.grab(a);
- b.grab(c)
- }
- var c = new Element("label"),
- d = new Element("input", {
- type: "checkbox"
- });
- d.addEvent("change", function() {
- e.checked = !1;
- setCollegeMode(d.checked ? "my" : "none")
- });
- c.grab(d);
- a ? c.appendText(" Find strangers from my college") : c.appendText(" " + collegeAndAuth[0]);
- b.grab(c);
- a ? b.grab(new Element("br")) :
- b.appendText(" ");
- var a = new Element("label"),
- e = new Element("input", {
- type: "checkbox"
- });
- e.addEvent("change", function() {
- d.checked = !1;
- setCollegeMode(e.checked ? "any" : "none")
- });
- a.grab(e);
- a.appendText(" Any college");
- b.grab(a);
- "my" === collegeMode ? d.checked = !0 : "any" === collegeMode && (e.checked = !0);
- return b
- }
- function makeCollegeEmailForm(a) {
- var b = new Element("div"),
- c = ["<strong>College student</strong> chat", "<strong>College student</strong> chat"],
- d = Math.floor(Math.random() * c.length),
- e = new Element("div"),
- c = new Element("a", {
- html: c[d],
- href: "javascript:",
- events: {
- click: function(a) {
- a.preventDefault();
- b.grab(f);
- g.focus();
- e.dispose();
- (new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=college39-" + d
- }
- }
- });
- c.setStyles({
- display: "block",
- "margin-top": "0.5em",
- border: "1px solid #CCC",
- background: "#EEE",
- color: "black",
- "text-align": a ? "center" : "left",
- "text-decoration": "none",
- padding: "0.25em",
- "border-radius": "0.5em",
- position: "relative"
- });
- c.setStyle("padding-left", a ? "0.25em" : "1.25em");
- c.grab(new Element("span", {
- text: "\u25b6",
- styles: {
- position: "absolute",
- left: "1em"
- }
- }), "top");
- e.grab(c);
- b.grab(e);
- var f = new Element("form", {
- styles: {
- margin: 0,
- padding: 0,
- "text-align": "justify"
- },
- events: {
- submit: function(a) {
- function b(a, c) {
- r.setStyle("color", a ? "green" : "red");
- var e = c.split("\n");
- r.empty();
- for (var d = 0; d < e.length; d++) r.grab(new Element("div", {
- text: e[d]
- }));
- g.set("disabled", !1);
- m.set("disabled", !1);
- g.set("value", "")
- }
- a.preventDefault();
- r.empty();
- g.set("disabled", !0);
- m.set("disabled", !0);
- var c = serverManager.pickServer();
- subdomainManager.subdomainWindow(c, function(a) {
- killHeaders(new a.Request.JSON({
- url: subdomainManager.fixUrl(c, "/send_email"),
- onSuccess: function(a) {
- (new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=collegex39-" + d;
- b(a.success, a.msg)
- },
- onFailure: function() {
- b(!1, "Technical error. Sorry. :(")
- }
- })).post({
- email: g.get("value")
- })
- })
- }
- }
- });
- f.setStyle("margin-top", "1em");
- c = new Element("div", {
- styles: {
- "font-size": "0.9em"
- }
- });
- c.set("html", "Please enter a college email address <strong>ending in .edu or .edu.XX or .ac.XX</strong> to verify you're in college. This will allow you to chat with other college students.");
- f.grab(c);
- var c = new Element("div", {
- styles: {
- "text-align": a ? "center" : "left"
- }
- }),
- i = new Element("label"),
- g = new Element("input", {
- type: "text",
- size: "35"
- });
- i.grab(g);
- c.grab(i);
- var m = new Element("input", {
- type: "submit",
- value: "Go"
- });
- c.appendText(" ");
- c.grab(m);
- f.grab(c);
- var r = new Element("div", {
- styles: {
- "text-align": a ? "center" : "left"
- }
- });
- f.grab(r);
- a = new Element("div", {
- styles: {
- "font-size": "0.9em"
- }
- });
- a.set("html", "<strong>We WON'T spam you, sell your address, or save it.</strong><br>We'll email you to verify your college address, and that's all. Other users won't see your address, only the domain (the part after the @ sign).");
- f.grab(a);
- return b
- }
- var initOfFbCallbacks = [],
- initOfFbComplete = !1;
- window.fbAsyncInit = function() {
- FB.init({
- appId: "372387627273",
- cookie: !0,
- status: !0,
- xfbml: !0,
- oauth: !0,
- channelUrl: "http://" + document.domain + "/static/channel.html"
- });
- initOfFbComplete = !0;
- for (var a = 0; a < initOfFbCallbacks.length; a++) initOfFbCallbacks[a]();
- initOfFbCallbacks = null
- };
- function unmonitoredConfirm() {
- return confirm("Because this section is not moderated, you are more likely to encounter sexual behavior. As with the rest of Omegle, users in this section are solely responsible for their own behavior.\n\nIF YOU ARE UNDER 18, or you would prefer not to use this section, press CANCEL. By pressing OK, you affirm that you are at least 18 years old.")
- }
- function startUnmonitoredVideo() {
- unmonitoredConfirm() && startFirstChat(!0, void 0, void 0, void 0, !0)
- }
- var basicReadyCalled = !1;
- function basicReady() {
- if (!basicReadyCalled) {
- basicReadyCalled = !0;
- if ($("feedback")) {
- var a = $$("#feedback h2");
- "#feedback" == location.hash ? ($("feedback").addClass("expanded"), $("feedbackmessage").focus()) : $("feedback").addClass("collapsed");
- a.addEvent("needsclick");
- a.addEvent("click", function() {
- $("feedback").hasClass("expanded") ? ($("feedback").removeClass("expanded"), $("feedback").addClass("collapsed")) : ($("feedback").removeClass("collapsed"), $("feedback").addClass("expanded"), $("feedbackmessage").focus())
- })
- }
- IS_MOBILE &&
- (window.RTCPeerConnection && navigator.getUserMedia && $("chatbtnwrapper") && $("chatbtn")) && ($("chatbtn").setStyles({
- display: "inline",
- "vertical-align": "middle"
- }), a = new Element("img", {
- alt: "Video",
- src: "/static/videobtn-enabled" + (window.devicePixelRatio && 1 < devicePixelRatio ? "@2x" : "") + ".png",
- events: {
- click: function() {
- startMobileVideo()
- }
- },
- styles: {
- "margin-left": "0.5em",
- "vertical-align": "middle"
- },
- width: 124,
- height: 50
- }), $("chatbtnwrapper").grab(a))
- }
- }
- function onReady() {
- function a() {
- $("tryspymodetext").empty();
- var a = makeSpyOptionsForm(startFirstChat);
- a.form.setStyle("marginTop", "0.5em");
- a.form.setStyle("marginBottom", "0.5em");
- $("tryspymodetext").appendText("Spy mode lets you ask a question and watch two strangers discuss it. (The strangers volunteer to be watched.)");
- $("tryspymodetext").grab(new Element("br"));
- $("tryspymodetext").appendText("Ask anything you like, but try to keep questions open-ended and thought-provoking.");
- $("tryspymodetext").grab(a.form);
- var b = new Element("div"),
- e = new Element("button", {
- text: "Ask strangers"
- });
- e.addEvent("click", a.go);
- b.grab(e);
- $("tryspymodetext").grab(b);
- b = new Element("div");
- b.setStyle("font-size", "0.9em");
- b.set("text", "Or you can try ");
- e = new Element("a");
- e.set("text", "discussing questions");
- e.set("href", "javascript:");
- e.addEvent("click", function(a) {
- a.preventDefault();
- startFirstChat(!1, null, !0, !1)
- });
- b.grab(e);
- b.appendText(" instead.");
- $("tryspymodetext").grab(b);
- a.focus()
- }
- basicReady();
- updateServerStatus();
- if (null ===
- $("textbtn") && null === $("chatbtn")) window.addEvent("load", onReady);
- else {
- "undefined" !== typeof FastClick && new FastClick(document.body);
- ($("textbtn") || $("chatbtn")).addEvent("click", function() {
- startFirstChat(!1)
- });
- if ($("mobileadwrapper") && (mobileAdWrapper = $("mobileadwrapper"), mobileAdWrapperSize = mobileAdWrapper.getSize(), "body" !== mobileAdWrapper.getParent().get("tag") && ($(document.body).grab(mobileAdWrapper), mobileAdWrapper.setStyle("display", "none")), $("mobileadwrapper2"))) {
- $("mobileadwrapper2").setStyles({
- width: mobileAdWrapperSize.x +
- "px",
- height: mobileAdWrapperSize.y + "px",
- margin: "auto",
- "text-align": "center"
- });
- var b = $("mobileadwrapper2").getPosition();
- mobileAdWrapper.setStyles({
- display: "block",
- position: "absolute",
- top: b.y + "px",
- left: b.x + "px"
- })
- }
- $("flashwrapper") && ($("flashwrapper").addEvent("mouseleave", function() {
- $("flash").mouseOut && $("flash").mouseOut()
- }), $("flashwrapper").addEvent("mouseenter", function() {
- $("flash").mouseOver && $("flash").mouseOver()
- }), swfobject.embedSWF("/static/omegle.swf?40", "flash", 320, 520, "10.0.0", null, null,
- null, null,
- function(a) {
- a.success || $("videobtnstatus").set("html", 'Requires <a href="http://get.adobe.com/flashplayer/">Flash 10</a>.')
- }));
- $("tryspymode") && (b = function() {
- $("textbtnstatus") && $("textbtnstatus").empty();
- $("tryspymode").setStyle("display", "block");
- $("tryspymode").removeEvents("click");
- $("tryspymode").removeClass("collapsed");
- if ("spy" == idealSpyMode) a();
- else {
- $("tryspymodetext").empty();
- $("tryspymodetext").set("html", "Spy mode gives you and a stranger a <strong>random question</strong> to discuss. The question is submitted by a third stranger who can watch the conversation, but can't join in.");
- var b = new Element("button", {
- text: "Check it out!"
- });
- b.addEvent("click", function(a) {
- a.preventDefault();
- startFirstChat(!1, null, !0, !1)
- });
- $("tryspymodetext").grab(new Element("br"));
- $("tryspymodetext").grab(b);
- b = new Element("div");
- b.setStyle("font-size", "0.9em");
- b.set("text", "Or you can try ");
- var d = new Element("a");
- d.set("text", "asking a question");
- d.set("href", "javascript:");
- d.addEvent("click", function(b) {
- b.preventDefault();
- a()
- });
- b.grab(d);
- b.appendText(" instead.");
- $("tryspymodetext").grab(b)
- }
- }, $("tryspymode").addClass("needsclick"),
- $("tryspymode").addEvent("click", b), IS_MOBILE || ($("tryspymode").setStyle("display", "none"), (new Element("a", {
- id: "spymodebtn",
- text: "Spy (question) mode",
- href: "javascript:",
- styles: {
- "border-radius": "0.5em",
- "-moz-border-radius": "0.5em",
- "-webkit-border-radius": "0.5em",
- background: "#EEE",
- "font-weight": "normal",
- padding: "0.333em 0",
- display: "block",
- "margin-left": "3px",
- "margin-right": "3px",
- "margin-top": "0.25em",
- color: "#333",
- "text-decoration": "none"
- },
- events: {
- click: b
- }
- })).inject("textbtnstatus")));
- b = makeTopicSettings(!0);
- $("topicsettingscontainer") && $("topicsettingscontainer").grab(b);
- collegeJustEnabled && (b = new Element("div", {
- styles: {
- width: "90%",
- "border-radius": "0.5em",
- "text-align": "center",
- padding: "0.5em",
- "margin-top": "1em",
- "margin-left": "auto",
- "margin-right": "auto"
- }
- }), collegeAndAuth ? (b.setStyle("background", "#FF9"), b.set("html", "Congrats! You enabled Omegle's new dorm mode. Start a new text or video chat, and you will be matched with other college students.<br><br>If you ever want to disable this, just uncheck the associated checkbox (above).")) :
- (b.setStyle("background", "red"), b.set("text", "Sorry! It looks like you tried to enable dorm mode, but there was a technical error. Please make sure you have cookies enabled and try again.")), $("intro") && $("intro").grab(b), $("chattypes").scrollIntoView(!1))
- }
- }
- window.addEvent("domready", onReady);
- function googleTranslateElementFullyLoaded() {
- if ("undefined" !== typeof googTr && googTr.e && googTr.g && "string" === typeof googTr.e && "string" === typeof googTr.g && ("en" !== googTr.e.substr(0, 2).toLowerCase() || "en" !== googTr.g.substr(0, 2).toLowerCase()) && $("google_translate_wrapper") && $("google_translate_lower_container") && $("google_translate_lower_container").grab) {
- $("google_translate_lower_container").grab($("google_translate_wrapper"));
- $("google_translate_lower_container").grab(new Element("br"));
- var a = "English";
- googTr.va && "string" === typeof googTr.va.en && (a = googTr.va.en);
- $("google_translate_lower_container").appendText('(Select "' + a + '" to chat in English)')
- }
- }
- function onLoad() {
- IS_MOBILE && setTimeout(function() {
- window.scrollTo(0, 1)
- }, 0);
- IS_MOBILE || startSpinner()
- }
- window.addEvent("load", onLoad);
- var topicManager = function() {
- function a() {
- Cookie.write("topiclist", JSON.encode(d), {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- }
- function b(a) {
- return a.toLowerCase().replace(/[^a-zA-Z0-9]/g, "")
- }
- function c(a) {
- for (var a = b(a), c = 0; c < d.length; c++)
- if (b(d[c]) === a) return !0;
- return !1
- }
- var d = [],
- e = Cookie.read("topiclist");
- e && (d = JSON.decode(e));
- a();
- return {
- list: function() {
- return d
- },
- add: function(e) {
- if (!b(e) || c(e)) return !1;
- d.push(e);
- a();
- return !0
- },
- remove: function(c) {
- for (var c = b(c), e = 0; e < d.length; e++)
- if (b(d[e]) === c) return d.splice(e,
- 1), a(), !0;
- return !1
- },
- normalize: b,
- check: c
- }
- }();
- function makeTopicSettings(a) {
- function b(a) {
- var b = new Element("span", {
- "class": "topictag"
- }),
- c = new Element("span", {
- "class": "topictagtext",
- text: a
- });
- b.grab(c);
- c = new Element("span", {
- "class": "topictagdelete",
- html: "×"
- });
- c.addEvent("click", function() {
- b.destroy();
- topicManager.remove(a);
- e()
- });
- b.grab(c);
- r.grab(b);
- c = new Element("span");
- c.setStyle("font-size", 0);
- c.appendText(" ");
- r.grab(c)
- }
- function c() {
- e();
- setTimeout(e, 0)
- }
- function d() {
- var a = l.get("value");
- l.set("value", "");
- for (var a = a.split(","), a = a.map(function(a) {
- return a.trim()
- }),
- c = 0; c < a.length; c++) {
- var d = a[c];
- topicManager.add(d) && (b(d), setShouldUseLikes(!0), J.set("checked", !0))
- }
- IS_MOBILE && l.blur();
- e()
- }
- function e() {
- l.value || topicManager.list().length ? u.setStyle("display", "none") : a && !IS_MOBILE ? u.setStyle("display", "block") : u.setStyle("display", "inline");
- w.checked || topicManager.list().length ? p.setStyle("display", "block") : p.setStyle("display", "none")
- }
- function f(a) {
- Cookie.write("fblikes", a ? "1" : "0", {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- }
- function i() {
- y.setStyle("display",
- "block");
- shouldUseFbLikes && (w.set("checked", !0), e());
- "0" !== Cookie.read("fblikes") && FB.getLoginStatus(function(a) {
- a.authResponse ? (w.set("checked", !0), f(!0), shouldUseFbLikes = !0) : f(!1);
- e()
- })
- }
- var g = new Element("div", {
- "class": "topictageditor"
- });
- if (a && !IS_MOBILE) {
- g.setStyles({
- padding: "4px",
- "min-height": "40px",
- "border-radius": "4px",
- position: "relative"
- });
- try {
- g.setStyle("background", "-moz-linear-gradient(0deg, #F7F7F7, #FFF)"), g.setStyle("background", "-webkit-linear-gradient(0deg, #F7F7F7, #FFF)"), g.setStyle("background",
- "linear-gradient(0deg, #F7F7F7, #FFF)")
- } catch (m) {}
- g.setStyle("border-radius", "3px / 5px")
- }
- var r = new Element("span", {
- "class": "topictagwrapper"
- });
- g.grab(r);
- $each(topicManager.list(), b);
- var u = new Element("span", {
- "class": "topicplaceholder"
- });
- IS_MOBILE ? u.appendText("Add your interests (optional)") : (u.appendText("What do you wanna talk about? (Type your interests here.)"), a && (u.empty(), u.appendText("Add your interests (optional)"), u.setStyles({
- "line-height": "48px",
- "text-align": "center",
- "vertical-align": "middle",
- "font-family": "'Lucida Grande', Lucida, sans-serif",
- "font-size": "21px",
- position: "absolute",
- top: 0,
- left: 0,
- right: 0,
- bottom: 0
- })));
- g.grab(u);
- var l = new Element("input", {
- type: "text",
- "class": "newtopicinput"
- });
- l.addEvent("keydown", c);
- l.addEvent("keypress", c);
- l.addEvent("keyup", c);
- l.addEvent("keydown", function(a) {
- 32 === a.code && !l.get("value") && a.preventDefault();
- if (13 === a.code || 188 === a.code) a.preventDefault(), d()
- });
- l.addEvent("blur", d);
- g.grab(l);
- g.addClass("needsclick");
- g.addEvent("click", function() {
- l.focus()
- });
- var s = new Element("div", {
- styles: {
- "text-align": "left"
- }
- });
- s.grab(g);
- var Q = new Element("div"),
- j = new Element("a", {
- "class": "needsclick",
- text: "Add my Tumblr tags as topics",
- href: "javascript:",
- events: {
- click: function(a) {
- a.preventDefault();
- j.dispose();
- Q.grab(B);
- v.focus()
- }
- },
- styles: {
- "margin-left": "1.5em"
- }
- });
- Q.grab(j);
- var B = new Element("form", {
- styles: {
- margin: 0,
- padding: 0
- },
- events: {
- submit: function(a) {
- a.preventDefault();
- if (!v.get("disabled") && (a = v.get("value"))) v.set("value", ""), v.set("disabled", !0), t.set("disabled", !0), loadTumblrTags(a, function(a) {
- v.set("disabled", !1);
- t.set("disabled", !1);
- if (a.success) {
- for (var a = processTumblrTags(a.tags), c = 0; c < a.length; c++) {
- var d = a[c];
- topicManager.add(d) && (b(d), setShouldUseLikes(!0), J.set("checked", !0))
- }
- e();
- C.empty();
- B.dispose();
- Q.grab(j);
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Tumblr tags", "Tags added"])
- } else C.empty(), C.setStyle("color", "red"), C.appendText(a.error)
- })
- }
- }
- }),
- g = new Element("label");
- g.appendText("Tumblr name: ");
- var v = new Element("input", {
- type: "text"
- });
- g.grab(v);
- B.grab(g);
- B.appendText(" ");
- var t = new Element("input", {
- type: "submit",
- value: "Go"
- });
- B.grab(t);
- var C = new Element("div");
- C.setStyle("font-size", "0.9em");
- C.setStyle("max-width", "20em");
- C.appendText("Omegle will try to learn your interests from posts and likes you've made public on Tumblr. Omegle is NOT requesting special access to your Tumblr account, and will NOT save your username, or give it to anyone.");
- B.grab(C);
- var y = new Element("div");
- y.setStyle("display", "none");
- var g = new Element("label"),
- w = new Element("input", {
- type: "checkbox"
- });
- w.addEvent("click", function(a) {
- w.checked ? (a.preventDefault(), FB.login(function(a) {
- a.authResponse && (shouldUseFbLikes = !0, f(!0), w.set("checked", !0), setShouldUseLikes(!0), J.set("checked", !0), e())
- }, {
- scope: "user_likes"
- })) : (shouldUseFbLikes = !1, f(!1));
- setTimeout(e, 0)
- });
- g.grab(w);
- g.appendText(" Add my Facebook likes as topics");
- y.grab(g);
- s.grab(y);
- var p = new Element("div"),
- g = makeShouldUseLikesCheckbox(),
- J = g.getElement("input");
- p.grab(g);
- s.grab(p);
- e();
- initOfFbComplete ?
- i() : initOfFbCallbacks.push(i);
- if (collegeAndAuth) {
- var D = makeCollegeCheckboxes(new Element("a", {
- href: "javascript:",
- text: "(Delete)",
- styles: {
- "font-weight": "normal"
- },
- events: {
- click: function(b) {
- b.preventDefault();
- confirm('Are you sure you want to remove your college affiliation?\n\nIf you just want to quit dorm chat and chat with completely random strangers, you can uncheck the "find strangers from my college" box.') && (clearCollegeSetting(), makeCollegeEmailForm(a).replaces(D))
- }
- }
- }));
- s.grab(D)
- } else s.grab(makeCollegeEmailForm(a));
- return s
- }
- var subdomainManager = function() {
- var a = {},
- b = {};
- return {
- subdomainWindow: function(c, d) {
- if (void 0 !== Browser.Request().withCredentials) d(window);
- else if (a[c]) d(a[c]);
- else {
- b[c] ? b[c].push(d) : b[c] = [d];
- var e = new Element("iframe", {
- src: "http://" + c + "/static/xhrframe.html",
- width: 0,
- height: 0,
- frameBorder: 0
- });
- e.setStyle("display", "none");
- $(document.body).grab(e)
- }
- },
- fixUrl: function(a, b) {
- return void 0 !== Browser.Request().withCredentials ? "http://" + a + b : b
- },
- iframeLoaded: function(c, d) {
- if (!a[c] && (a[c] = d, b[c])) {
- for (var e = 0; e <
- b[c].length; e++)(0, b[c][e])(d);
- delete b[c]
- }
- }
- }
- }(),
- serverManager = function() {
- var a = [],
- b = null,
- c = null,
- d = {
- setKnownGood: function() {
- b = c
- },
- unsetKnownGood: function() {
- b = null
- },
- pickServer: function() {
- if (null !== b && -1 !== a.indexOf(b)) return b;
- var e = a.shift();
- a.push(e);
- return c = e
- },
- setServerList: function(b) {
- var c, d, g;
- for (c = 1; c < b.length; c++) d = Math.floor(Math.random() * (1 + c)), d != c && (g = b[c], b[c] = b[d], b[d] = g);
- for (c = 0; c < b.length; c++) d = b[c], -1 === a.indexOf(d) && a.unshift(d);
- for (c = 0; c < a.length; c++) d = a[c], -1 === b.indexOf(d) && a.splice(c,
- 1)
- }
- };
- d.setServerList("front1.omegle.com front2.omegle.com front3.omegle.com front4.omegle.com front5.omegle.com front6.omegle.com front7.omegle.com front8.omegle.com front9.omegle.com".split(" "));
- return d
- }(),
- timeManager = function() {
- var a = 0;
- return {
- now: function() {
- var b = new Date;
- b.setTime(b.getTime() + a);
- return b
- },
- gotAccurateTime: function(b) {
- a = b - new Date
- }
- }
- }(),
- flashCb_gotNearID, flashCb_errorConnectingToStratus, flashCb_camAvailable, flashCb_screenshotNotPosted = function() {
- lastScreenshotTime = null
- };
- function resetStratusCallbacks() {
- flashCb_gotNearID = function() {};
- flashCb_errorConnectingToStratus = function() {}
- }
- function resetCameraCallbacks() {
- flashCb_camAvailable = function() {}
- }
- function resetFlashCallbacks() {
- resetStratusCallbacks();
- resetCameraCallbacks()
- }
- resetFlashCallbacks();
- var videoChatEnabled = !1,
- flashWatermarkTrack = null;
- function flashCb_init(a) {
- -1 === navigator.userAgent.indexOf("AppleWebKit") && $("flashwrapper").addClass("inited");
- "#nwc" == window.location.hash && (a = !0);
- a ? (videoChatEnabled = !0, $("videobtn").set("src", $("videobtn").get("src").replace("-disabled", "-enabled")), $("videobtn").removeClass("disabled"), $("videobtn").removeEvents("click"), $("videobtn").addEvent("click", function() {
- startFirstChat(!0)
- }), $("videobtnstatus").empty(), $("videobtnstatus").setStyle("padding-top", "0"), a = new Elements([(new Element("a", {
- id: "videobtnunmoderated",
- text: "Unmoderated section",
- href: "javascript:",
- styles: {
- "border-radius": "0.5em",
- "-moz-border-radius": "0.5em",
- "-webkit-border-radius": "0.5em",
- background: "#EEE",
- "font-weight": "normal",
- padding: "0.333em 0",
- display: "block",
- "margin-left": "3px",
- "margin-right": "3px",
- "margin-top": "0.25em",
- color: "#333",
- "text-decoration": "none"
- }
- })).inject("videobtnstatus")]), $("unmonitoredvideobtn") && a.push((new Element("a", {
- id: "unmonitoredvideobtn",
- text: $("unmonitoredvideobtn").get("text"),
- href: "javascript:"
- })).replaces("unmonitoredvideobtn")),
- a.addEvent("click", function(a) {
- a.preventDefault();
- startUnmonitoredVideo()
- }), shouldForceUnmonitored && $("videobtnstatus").set("html", " ")) : $("videobtnstatus").set("html", "Requires a webcam.");
- $("flash") && $("flash").setRandID && $("flash").setRandID(randID)
- }
- function killHeaders(a) {
- delete a.headers["X-Requested-With"];
- delete a.headers["X-Request"];
- return a
- }
- function makeSpyOptionsForm(a, b, c) {
- function d() {
- a(!1, g.value, !1, m.checked)
- }
- void 0 === b && (b = "");
- void 0 === c && (c = !0);
- var e = new Element("form");
- e.addEvent("submit", function(a) {
- a.preventDefault();
- d()
- });
- var f = new Element("div"),
- i = new Element("label");
- i.grab(new Element("strong", {
- text: "Enter a question:"
- }));
- i.grab(new Element("br"));
- var g = new Element("input", {
- "class": "questionInput",
- value: b,
- maxlength: 200
- });
- i.grab(g);
- f.grab(i);
- e.grab(f);
- b = new Element("div");
- b.setStyle("marginTop", "0.5em");
- var f = new Element("label"),
- m = new Element("input", {
- type: "checkbox",
- checked: c
- });
- f.grab(m);
- f.appendText(" I want Omegle to reuse this question if it's good enough.");
- b.grab(f);
- e.grab(b);
- return {
- form: e,
- focus: function() {
- g.focus()
- },
- go: d
- }
- }
- var flashingInterval = null;
- function isFlashing() {
- return null !== flashingInterval
- }
- function startFlashing() {
- function a() {
- var a = b.pop();
- document.title = a[0];
- setFavicon(a[1]);
- b.unshift(a)
- }
- if (!IS_MOBILE && !isFlashing()) {
- var b = [
- ["___Omegle___", "/static/favicon.png"],
- ["\u00af\u00af\u00afOmegle\u00af\u00af\u00af", "/static/altfavicon.png"]
- ];
- flashingInterval = setInterval(a, 500);
- a();
- $(document).addEvent("mousemove", mouseMove);
- $(document).addEvent("keydown", stopFlashing);
- $(document).addEvent("focus", stopFlashing);
- $(window).addEvent("mousemove", mouseMove);
- $(window).addEvent("keydown", stopFlashing);
- $(window).addEvent("focus", stopFlashing)
- }
- }
- var lastCoords = null;
- function mouseMove(a) {
- a = a.page;
- null !== lastCoords && (a.x != lastCoords.x || a.y != lastCoords.y) && stopFlashing();
- lastCoords = a
- }
- function stopFlashing() {
- isFlashing() && (clearInterval(flashingInterval), flashingInterval = null, document.title = "Omegle", setFavicon("/static/favicon.png"), $(document).removeEvent("mousemove", mouseMove), $(document).removeEvent("keydown", stopFlashing), $(document).removeEvent("focus", stopFlashing), $(window).removeEvent("mousemove", mouseMove), $(window).removeEvent("keydown", stopFlashing), $(window).removeEvent("focus", stopFlashing))
- }
- function setFavicon(a) {
- for (var b = $$("link"), c = 0; c < b.length; c++)
- if ("icon" === b[c].rel) {
- b[c].href = a;
- return
- }
- a = new Element("link", {
- rel: "icon",
- type: "image/png",
- href: a
- });
- $$("head")[0].grab(a)
- }
- var spinnerPossible = !1;
- function initSpinner(a) {
- function b(a, b, d) {
- u.clearRect(0, 0, i, g);
- u.drawImage(c, f, 0, e - f, f, 2 * f, f, e - f, f);
- a /= b;
- a = 0.75 > a ? 2.125 * Math.PI * Math.sin(a / 0.75 * (Math.PI / 2)) : Math.PI / 8 - Math.PI / 8 * (a - 0.75) / 0.25;
- d && (a = -a);
- u.save();
- u.translate(1.6 * f, 1.6 * f);
- u.rotate(a);
- u.drawImage(c, 0, 0, f, f, 0.6 * -f, 0.6 * -f, f, f);
- u.restore()
- }
- if (window.CanvasRenderingContext2D) {
- var c = $$("#logo > img")[0];
- if (c && c.height) {
- $("header").setStyles({
- height: "57px"
- });
- var d = new Element("canvas");
- d.setStyle("position", "absolute");
- var e = c.naturalWidth ||
- c.width,
- f = c.naturalHeight || c.height,
- i = e + f,
- g = 3 * f,
- m = c.width + c.height,
- r = 3 * c.height;
- d.width = i;
- d.height = g;
- d.style.width = m + "px";
- d.style.height = r + "px";
- d.style.marginLeft = "-" + c.height + "px";
- d.style.marginTop = "-" + c.height + "px";
- var u = d.getContext("2d");
- spinnerPossible = !0;
- if (a) return !0;
- var l = !1;
- startSpinner = function() {
- if (!l) {
- l = !0;
- var a = 500 + 400 * Math.random(),
- c = null;
- window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(a) {
- window.setTimeout(a,
- 1E3 / 60)
- };
- var d = 0.5 > Math.random();
- requestAnimFrame(function v(e) {
- e || (e = +new Date);
- c || (c = e);
- e -= c;
- e > a ? (l = !1, b(0, 1)) : (b(e, a, d), requestAnimFrame(v))
- })
- }
- };
- initSpinner = function() {};
- b(0, 1);
- c.setStyle("visibility", "hidden");
- c.grab(d, "before");
- return !0
- }
- }
- }
- function startSpinner() {
- initSpinner() && startSpinner()
- }
- var mobileAdWrapper = null,
- mobileAdWrapperSize = null,
- currentAffiliate = null,
- isFirstChat = !0,
- chatOddEven = !0,
- chatPervTrack = [];
- function startNewChat(a, b, c, d, e, f) {
- function i() {
- var a = document.activeElement;
- if (!a) return q.get("disabled");
- a = a.nodeName.toLowerCase();
- return "input" !== a && "textarea" !== a
- }
- function g(a) {
- 27 === a.code && a.preventDefault();
- var b = new Date;
- (16 === a.code || 17 === a.code || 18 === a.code || 91 === a.code || 93 === a.code) && null !== Ia && 200 > b - Ia && 350 <= b - fa ? (F(), H()) : !IS_MOBILE && !q.get("disabled") && !a.control && !a.meta && (8 === a.code || 37 == a.code || 39 == a.code || 46 <= a.code && 90 >= a.code || 96 <= a.code && 111 >= a.code) ? q.focus() : 8 === a.code && i() &&
- a.preventDefault()
- }
- function m(a) {
- if (27 === a.code) {
- a.preventDefault();
- if (N.get("disabled")) return;
- bb && 500 <= new Date - fa && (a.shift || a.alt || a.meta) ? (F(), H()) : (ka(), Ia = new Date)
- }
- 8 === a.code && i() && a.preventDefault()
- }
- function r() {
- var a = new Date;
- if (50 > a - Ja) Ka || (Ka = setTimeout(r, 50 - (a - Ja)));
- else if (Ka = null, Ja = a, a = $$(".msggroup"), !(3 > a.length))
- for (var b = $(document.body).getScroll(), c = $(document.body).getSize(), d = 0; d < a.length; d++) {
- var e = a[d],
- f = e.getCoordinates();
- if (!(f.bottom < b.y + bwLogo.height + 5) && !(f.width + bwLogo.width +
- 10 > c.x)) {
- if (f.bottom > b.y + c.y) {
- K && (K.dispose(), K = null);
- break
- }
- if (K && e == K.getParent()) break;
- K && K.dispose();
- K = new Element("div", {
- styles: {
- position: "absolute",
- bottom: 0
- }
- });
- "right" == e.getComputedStyle("float") ? K.setStyle("left", "-" + (bwLogo.width + 10) + "px") : K.setStyle("right", "-" + (bwLogo.width + 10) + "px");
- K.grab(bwLogo);
- e.grab(K);
- break
- }
- }
- }
- function u(a) {
- var b = IS_MOBILE && document.activeElement && $(q) == $(document.activeElement);
- scrollElt.scrollTop = scrollElt.scrollHeight;
- b && $(q) != $(document.activeElement) && q.focus();
- IS_MOBILE && r();
- if (a || void 0 === a)
- for (a = 50; 500 >= a; a += 150) setTimeout(function() {
- u(!1)
- }, a)
- }
- function l(a, b) {
- var c = new Element("form");
- c.setStyle("display", "none");
- c.set("method", "post");
- c.set("target", "_blank");
- c.set("action", "http://logs.omegle.com/generate");
- c.set(b);
- var a = a || {
- host: 1
- },
- d = {
- log: JSON.encode(la),
- randid: randID
- };
- V && (d.topics = JSON.encode(V));
- La && (d.identdigests = La);
- d = $extend(d, a);
- $each(d, function(a, b) {
- var R = new Element("input", {
- type: "hidden",
- name: b,
- value: a
- });
- c.grab(R)
- });
- $(document.body).grab(c);
- c.submit();
- setTimeout(function() {
- c.dispose()
- }, 0)
- }
- function s(a) {
- if (a) {
- for (var b = 0, c = 0, d = 0; d < a.length; d++) a[d].percentage ? c += a[d].percentage : b++;
- if (b)
- for (d = 0; d < a.length; d++) a[d].percentage || (a[d].percentage = (100 - c) / (b + 1))
- }
- }
- function Q(a, b) {
- if (!a) return b;
- for (var c = 100 * Math.random(), d = 0; d < a.length; d++) {
- var e = a[d];
- if (c < e.percentage) return $merge(b, e);
- c -= e.percentage
- }
- return b
- }
- function j(a) {
- s(a.tests);
- s(a.variants);
- if (a.tests)
- for (var b = 0; b < a.tests.length; b++) s(a.tests[b].variants)
- }
- function B(a) {
- var b;
- b =
- IS_MOBILE ? !0 : scrollElt.scrollTop >= scrollElt.scrollHeight - scrollElt.clientHeight;
- a = a();
- b && u();
- return a
- }
- function v(a, b) {
- return B(function() {
- var c = new Element("div", {
- "class": "logitem"
- });
- c.grab(a);
- 0 === L.length || b ? ma.grab(c) : c.inject(L[0].element, "before");
- return c
- })
- }
- function t(a, b, c, d) {
- (void 0 === b || b) && startFlashing();
- var e;
- void 0 === d || d && "string" !== typeof d ? (b = !0, e = null) : "string" === typeof d ? (b = !0, e = d) : b = !1;
- "string" === typeof a ? (d = new Element("p", {
- "class": "statuslog"
- }), d.appendText(a), null === e && (e = a)) :
- (d = new Element("div", {
- "class": "statuslog"
- }), d.grab(a));
- b && (!ua && null !== e) && la.push([e]);
- return v(d, c)
- }
- function C(a) {
- "undefined" !== typeof Recaptcha && Recaptcha.destroy();
- null !== aa && aa.dispose();
- aa = v(a);
- initialLogIsRecaptcha = !1
- }
- function y(a, b) {
- "undefined" !== typeof Recaptcha && Recaptcha.destroy();
- null !== aa && aa.dispose();
- aa = t(a, !1, !1, "undefined" === typeof b ? !1 : b);
- initialLogIsRecaptcha = !1
- }
- function w(a, b, c) {
- var d = new Element("span");
- cb && d.addClass("notranslate");
- var e = !0;
- $each(c.split("\n"), function(a) {
- e ||
- d.grab(new Element("br"));
- e = !1;
- d.appendText(a)
- });
- if (IS_MOBILE) {
- var f = new Element("div", {
- "class": "msggroup-msg"
- });
- f.grab(d);
- if (db === a) B(function() {
- eb.grab(f)
- });
- else {
- b = new Element("div", {
- "class": "msggroup " + b + "group"
- });
- new Element("div", {
- "class": "msggroup-label",
- text: a + ":"
- });
- var G = new Element("div", {
- "class": "msggroup-msgs"
- });
- G.grab(f);
- b.grab(G);
- v(b);
- eb = G;
- db = a
- }
- } else b = new Element("p", {
- "class": b
- }), G = new Element("strong", {
- "class": "msgsource"
- }), G.appendText(a + ":"), b.grab(G), b.appendText(" "), b.grab(d),
- v(b);
- ua || la.push([a + ":", c])
- }
- function p(a, b) {
- if ("you" == a) {
- var c = "youmsg",
- d = "You";
- Ma = !0
- } else c = "strangermsg", d = "Stranger", startFlashing(), fb = !0;
- b = b.trim();
- "stranger" === a && -1 !== b.toLowerCase().indexOf("videobam") || (w(d, c, b), "stranger" === a && (-1 !== b.indexOf("FBI") || -1 !== b.toLowerCase().indexOf("federal bureau")) && t("If the above message says you have been reported to the FBI, it is not legitimate. Please ignore it."), "stranger" === a && (-1 !== b.toLowerCase().indexOf("facebook.com/profile.php?") && -1 === b.toLowerCase().indexOf("id=")) &&
- t("THE STRANGER DOES NOT KNOW YOUR FACEBOOK INFO. The above link directs anyone to their own profile; it is not really a link to your profile specifically."))
- }
- function J(a) {
- for (var b = 0; b < L.length; b++)
- if (!a || L[b].name === a) {
- L[b].element.dispose();
- L.splice(b, 1);
- break
- }
- }
- function D() {
- J("Stranger")
- }
- function M(a) {
- J(a);
- var b = t(a + " is typing...", !1, !0, !1);
- L.push({
- name: a,
- element: b
- })
- }
- function T() {
- na = !0;
- $("logo").removeEvent("click", E);
- null !== O && (clearInterval(O), O = null);
- ga && $(window).removeEvent("resize", ga);
- IS_MOBILE ? ($(document.body).removeEvent("scroll", r), $(document).removeEvent("scroll", r)) : ($(document).removeEvent("keydown", g), $(document).removeEvent("keyup", m));
- W.dispose()
- }
- function H(R, h, f, G, g) {
- if (!na) {
- if (void 0 === R) {
- if (null !== oa) {
- oa.go();
- return
- }
- R = a
- }
- R && (h = null, G = f = !1);
- void 0 === h && (h = b);
- void 0 === f && (f = c);
- void 0 === G && (G = d);
- void 0 === g && (g = e);
- null !== ba && (clearTimeout(ba), ba = null);
- R || U();
- T();
- startNewChat(R, h, f, G, g)
- }
- }
- function E() {
- if (!k.stopped && !pa) {
- if (!confirm("Are you sure you want to end your chat?")) return;
- F()
- }
- $(document.body).removeClass("inconversation");
- $(document.body).removeClass("videochat");
- $("logo").setStyle("cursor", "default");
- T();
- showIntro()
- }
- function U() {
- null !== ba && (clearTimeout(ba), ba = null);
- $("flash") && $("flash").turnOffCamera && $("flash").turnOffCamera()
- }
- function A() {
- function R(b) {
- if ("video" !== b || videoChatEnabled) {
- if (ea) {
- ea = !1;
- var c = "video" === b ? "turn on " + b : "switch to " + b
- } else c = b;
- k.appendText(" or ");
- k.grab(new Element("a", {
- href: "javascript:",
- text: c,
- events: {
- click: function(c) {
- c.preventDefault();
- switch (b) {
- case "text":
- H(!1, null, !1, !1, !1);
- break;
- case "video":
- H(!0);
- break;
- case "moderated section":
- H(a, null, !1, !1, !1);
- break;
- case "unmoderated section":
- null !== z && z(), unmonitoredConfirm() && H(a, null, !1, !1, !0)
- }
- }
- }
- }))
- }
- }
- if (!pa) {
- pa = !0;
- chatOddEven = !chatOddEven;
- Na();
- newChatButton.removeEvents();
- null !== unmonSexyButton && unmonSexyButton.removeEvents();
- null !== unmonGayButton && unmonGayButton.removeEvents();
- resetFlashCallbacks();
- J();
- ua = !0;
- initialLogIsRecaptcha && ("undefined" !== typeof Recaptcha && Recaptcha.destroy(),
- aa.dispose(), aa = null, initialLogIsRecaptcha = !1);
- X && (X.destroy(), X = null);
- for (var h = 0; h < gb.length; h++) gb[h].dispose();
- mots = [];
- if (a) {
- if ($("flash") && $("flash").stopChat) try {
- $("flash").stopChat()
- } catch (f) {}
- ba = setTimeout(function() {
- ba = null;
- U()
- }, 12E4)
- }
- va && clearTimeout(va);
- !a && !IS_MOBILE && (qa.setStyle("margin-right", 0), ca.setStyle("margin-right", 0), (new Fx.Tween(qa, {
- duration: "short"
- })).start("margin-right", 0, "168px"), (new Fx.Tween(ca, {
- duration: "short"
- })).start("margin-right", 0, "168px"), $("adwrapper2") && ($("adwrapper2").setStyle("margin-left",
- "160px"), (new Fx.Tween($("adwrapper2"), {
- duration: "short"
- })).start("margin-left", "160px", 0)), setTimeout(u, 300));
- $(document.body).removeClass("inconversation");
- q.set("disabled", !0);
- q.addClass("disabled");
- ha.set("disabled", !0);
- q.blur();
- ha.blur();
- G("new");
- window.onbeforeunload = null;
- $(window).removeEvent("unload", F);
- stopped = !0;
- ma.get("html");
- var g = null;
- if (document.createRange && (window.getSelection || document.getSelection)) g = document.createRange(), g.selectNodeContents(ma);
- wa && (oa = makeSpyOptionsForm(H, b,
- d), v(oa.form), IS_MOBILE || oa.focus());
- var k = new Element("div", {
- "class": "newchatbtnwrapper"
- });
- newChatButton.addEvent("click", function() {
- H()
- });
- k.grab(newChatButton);
- var ea = !0;
- c || b ? (R("text"), R("video")) : a ? (R("text"), e || R("unmoderated section")) : R("video");
- (!IS_MOBILE || !ea) && t(k, !1, !1);
- if (Oa && !IS_MOBILE) {
- null === unmonSexyButton && (unmonSexyButton = new Element("img", {
- width: 124,
- height: 50,
- alt: "Sexy",
- styles: {
- cursor: "pointer",
- "vertical-align": "middle",
- "margin-right": "0.5em"
- }
- }), unmonSexyTrack = "", window.devicePixelRatio &&
- 1 < window.devicePixelRatio ? unmonSexyButton.set("src", "/static/sexbtn@2x.png?xx") : unmonSexyButton.set("src", "/static/sexbtn.png?xx"));
- unmonSexyButton.addEvent("click", function() {
- null !== z && z();
- var b = "unmon-upper-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
- b = b + (a ? "video" : "text");
- window.open("http://wawadmin.omegle.com/redir/" + (IS_MOBILE ? "mob" : "y") + "?track=" + b + unmonSexyTrack)
- });
- null === unmonGayButton && (unmonGayButton = new Element("img", {
- width: 124,
- height: 50,
- alt: "Gay",
- styles: {
- cursor: "pointer",
- "vertical-align": "middle"
- }
- }),
- unmonGayTrack = "", window.devicePixelRatio && 1 < window.devicePixelRatio ? unmonGayButton.set("src", "/static/gaybtnorange@2x.png") : unmonGayButton.set("src", "/static/gaybtnorange.png"));
- unmonGayButton.addEvent("click", function() {
- null !== z && z();
- var b = "unmon-upper-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
- b = b + (a ? "video" : "text");
- window.open("http://wawadmin.omegle.com/redir/gay?track=" + b + unmonGayTrack)
- });
- h = new Element("div");
- h.grab(unmonSexyButton);
- IS_MOBILE || h.grab(unmonGayButton);
- var x = new Element("span", {
- html: "×",
- styles: {
- "font-weight": "bold",
- color: "#555",
- "font-size": "1.5em",
- cursor: "pointer"
- },
- events: {
- click: function() {
- p.dispose();
- chatPervTrack = [];
- ra.dispose();
- xa.dispose()
- }
- }
- });
- e || (h.appendText(" "), h.grab(x));
- var p = v(h, !1)
- }
- if (!c && !b) {
- var i = new Element("div", {
- "class": "logtopicsettings"
- }),
- j = new Element("form", {
- styles: {
- margin: 0,
- padding: 0
- }
- }),
- x = new Element("label"),
- h = function() {
- r.checked ? setShouldUseEnglish(!0) : setShouldUseEnglish(!1)
- },
- n = new Element("input", {
- type: "radio",
- name: "language",
- value: "mylang",
- checked: !shouldUseEnglish
- });
- n.addEvent("click", h);
- x.grab(n);
- x.appendText(" My language");
- j.grab(x);
- j.appendText(" ");
- var x = new Element("label"),
- r = new Element("input", {
- type: "radio",
- name: "language",
- value: "english",
- checked: shouldUseEnglish
- });
- r.addEvent("click", h);
- x.grab(r);
- x.appendText(" English");
- j.grab(x);
- j.setStyle("display", "none");
- i.grab(j);
- var s = function() {
- !IS_MOBILE || !navigator.language || "EN" === navigator.language.substr(0, 2).toUpperCase() || da.get("checked") ? j.setStyle("display", "none") : j.setStyle("display",
- "block")
- },
- h = makeShouldUseLikesCheckbox(),
- da = h.getElement(".shoulduselikescheckbox");
- da.addEvent("click", s);
- s();
- i.grab(h);
- h = new Element("a", {
- href: "javascript:",
- text: "(Settings)"
- });
- !shouldUseFbLikes && !topicManager.list().length && (da.set("checked", !1), da.set("disabled", !0), h.set("text", "(Enable)"));
- h.addEvent("click", function(a) {
- a.preventDefault();
- null !== z && z();
- j.dispose();
- i.empty();
- a = makeTopicSettings();
- i.grab(j);
- i.grab(a);
- a.getElement("input").focus();
- da = a.getElement(".shoulduselikescheckbox");
- da.addEvent("click",
- s);
- w && w.dispose()
- });
- i.appendText(" ");
- i.grab(h);
- if (collegeAndAuth) {
- var w = makeCollegeCheckboxes(!1);
- i.grab(w)
- } else w = null;
- v(i)
- }
- h = new Element("div", {
- "class": "logsavelinks"
- });
- x = new Element("span", {
- "class": "conversationgreat"
- });
- IS_MOBILE ? x.set("text", "Great chat? Save the log!") : x.set("text", "Great chat?");
- x.addEvent("click", function() {
- l()
- });
- h.grab(x);
- x = [];
- n = new Element("a");
- n.set("text", "Get a link");
- n.set("href", "javascript:");
- n.addEvent("click", function(a) {
- a.preventDefault();
- l()
- });
- x.push(n);
- null !==
- g && !IS_MOBILE && (n = new Element("a", {
- href: "javascript:",
- text: "Select all"
- }), n.addEvent("click", function(a) {
- a.preventDefault();
- a = window.getSelection ? window.getSelection() : document.getSelection();
- a.removeAllRanges();
- a.addRange(g)
- }), x.push(n));
- var n = [],
- m = new Element("a", {
- href: "javascript:",
- text: "Facebook"
- });
- m.addEvent("click", function(a) {
- a.preventDefault();
- l({
- facebook: 1
- })
- });
- n.push(m);
- m = new Element("a", {
- href: "javascript:",
- text: "Tumblr"
- });
- m.addEvent("click", function(a) {
- a.preventDefault();
- l({
- tumblr: 1
- })
- });
- n.push(m);
- m = new Element("a", {
- href: "javascript:",
- text: "Twitter"
- });
- m.addEvent("click", function(a) {
- a.preventDefault();
- var a = screen.height,
- b = Math.round(screen.width / 2 - 275),
- c = 0;
- 420 < a && (c = Math.round(a / 2 - 210));
- window.open("", "intent", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left=" + b + ",top=" + c);
- l({
- tweet: 1
- }, {
- target: "intent"
- })
- });
- n.push(m);
- m = new Element("a", {
- href: "javascript:",
- text: "reddit"
- });
- m.addEvent("click", function(a) {
- a.preventDefault();
- l({
- reddit: 1
- })
- });
- n.push(m);
- IS_MOBILE ||
- (h.appendText(" Save the log: "), h.grab(middotify(x)), h.appendText(" \u2022\u00a0Or post log to: "), h.grab(middotify(n)));
- x = aurrp;
- if (wa || Ma && fb) t(h, !1, !1);
- else if (a) {
- var y = function() {
- fa.empty();
- A ? K || (K = !0, S.set("text", "Not automatically rerolling."), M.dispose(), D.grab(N), G("new")) : (I && fa.set("text", " (Paused while you move your mouse)"), S.set("text", "Automatically rerolling in a moment"), G("new", I ? void 0 : E))
- },
- C = function() {
- na || (E--, 1 > E ? (clearInterval(O), O = null, H()) : y())
- },
- B = function() {
- A || na ? $(document.body).removeEvent("mousemove",
- B) : (O && (clearInterval(O), O = null), P && (clearTimeout(P), P = null), I = !0, y(), P = setTimeout(function() {
- P = null;
- I = !1;
- y();
- !O && (!A && !na) && (O = setInterval(C, 1E3))
- }, 200))
- },
- E = 1,
- A = !x || z(),
- K = !1,
- I = !1,
- D = new Element("div", {
- styles: {
- "vertical-align": "middle"
- }
- }),
- S = new Element("span");
- D.grab(S);
- D.appendText(" ");
- var M = new Element("input");
- M.set("type", "button");
- M.set("value", "Stop");
- z = function() {
- A || (null !== O && (clearInterval(O), O = null), A = !0, $(document.body).removeEvent("mousemove", B), y())
- };
- M.addEvent("click", function() {
- z()
- });
- D.grab(M);
- var fa = new Element("span");
- D.grab(fa);
- var N = new Element("label");
- N.setStyle("color", "black");
- N.setStyle("font-weight", "normal");
- var W = new Element("input");
- W.set("type", "checkbox");
- W.set("checked", x);
- W.addEvent("change", function() {
- var a = W.checked;
- aurrp = a;
- Cookie.write("aurrp", a ? "1" : "0", {
- duration: 365,
- domain: document.domain,
- path: "/"
- })
- });
- N.grab(W);
- N.appendText(" Auto-reroll next time");
- y();
- t(D, !1, !1);
- h = D.getSize().y + "px";
- D.setStyle("height", h);
- D.setStyle("line-height", h);
- if (!A) {
- O = setInterval(C,
- 500);
- var P = null;
- $(document.body).addEvent("mousemove", B)
- }
- }
- c && !Ma && t("Please try to discuss the question, not just disconnect!");
- if (h = e ? Pa : currentAffiliate) {
- h = Q(h.variants, h);
- a && h.videoMode ? h = $merge(h, h.videoMode) : !a && h.textMode && (h = $merge(h, h.textMode));
- n = a ? "video" : "text";
- h.trackCode && (n = h.trackCode);
- h.baseTrackCode && (n = h.baseTrackCode + "-" + n);
- var T, x = new Element("span"),
- V = h.url.replace(/\$/g, n),
- L = new Element("a", {
- href: V,
- target: "_blank",
- events: {
- click: function() {
- null !== z && z()
- }
- }
- });
- L.setStyles({
- "text-decoration": "none"
- });
- h.image && (n = new Element("img", {
- src: h.image,
- alt: ""
- }), n.setStyles({
- border: "0 none",
- "vertical-align": "middle"
- }), L.grab(n), L.appendText(" "));
- h.text && (n = new Element("span"), n.setStyles({
- color: "black",
- "text-decoration": "none",
- "font-weight": "normal",
- background: "#EEE",
- padding: "0.25em 0.5em",
- "vertical-align": "middle",
- "border-radius": "0.5em",
- "-moz-border-radius": "0.5em",
- "-webkit-border-radius": " 0.5em",
- border: "1px solid #CCC"
- }), n.style.lineHeight = "1.5", h.style && n.setStyles(h.style), n.set("text", h.text), L.grab(n));
- x.grab(L);
- var Z = new Element("span");
- Z.set("html", "×");
- Z.setStyles({
- cursor: "default",
- color: "black",
- "font-weight": "bold"
- });
- Z.addEvent("click", function() {
- currentAffiliate = null;
- T.destroy()
- });
- h.noCloseButton || (x.appendText(" "), x.grab(Z));
- n = new Element("div");
- n.setStyle("cursor", "pointer");
- n.addEvent("click", function(a) {
- a = $(a.target);
- !L.hasChild(a) && !(L === a || Z === a || Z.hasChild(a)) && window.open(V, "_blank")
- });
- n.grab(x);
- T = v(n);
- if (h.bottomPositioning || void 0 === h.bottomPositioning) T.setStyle("height",
- n.getSize().y + "px"), n.setStyles({
- position: "absolute",
- bottom: "0.5em"
- })
- }
- if (mobileAdWrapper) {
- var Y = new Element("div", {
- styles: {
- width: mobileAdWrapperSize.x + "px",
- height: mobileAdWrapperSize.y + "px"
- }
- });
- t(Y);
- ga = function() {
- mobileAdWrapper.setStyles({
- display: "block",
- position: "absolute"
- });
- mobileAdWrapper.setPosition(Y.getPosition())
- };
- ga();
- $(window).addEvent("resize", ga)
- }
- }
- }
- function ia(a) {
- var b = new Element("iframe");
- b.setStyle("border", "0 none");
- b.setStyle("padding", 0);
- b.set("width", 318);
- C(b);
- initialLogIsRecaptcha = !0;
- var c = b.contentWindow ? b.contentWindow.document : b.contentDocument;
- b.addEvent("load", function() {
- var a = c.getElementById("theform");
- a && (b.height = a.offsetHeight);
- (a = c.getElementById("recaptcha_response_field")) && a.focus()
- });
- c.open();
- c.write('<script type="application/javascript">var RecaptchaOptions = {theme: "white"};<\/script>');
- c.write('<style type="text/css">html, body, form { margin: 0; padding: 0; }</style>');
- c.write('<form id="theform">');
- c.write('<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=' +
- encodeURIComponent(a) + '"><\/script>');
- c.write('<div style="padding-top: 0.5em"><input type="submit" value="Submit"></div>');
- c.write("</form>");
- c.close();
- b.height = c.getElementById("theform").offsetHeight;
- $(c.getElementById("theform")).addEvent("submit", function(a) {
- a.preventDefault();
- var a = c.getElementById("recaptcha_challenge_field").value,
- b = c.getElementById("recaptcha_response_field").value;
- k.submitRecaptcha(a, b);
- setTimeout(function() {
- y("Verifying...")
- }, 0)
- });
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent",
- "CAPTCHA", "CAPTCHA shown"
- ])
- }
- function F() {
- !k.stopped && !pa && (k.disconnect(), t("You have disconnected.", !1), A())
- }
- function ya() {
- return "Leaving this page will end your conversation."
- }
- function ka() {
- if (!N.get("disabled")) switch (hb) {
- case "disconnect":
- G("really");
- !q.get("disabled") && !IS_MOBILE && q.focus();
- break;
- case "really":
- F();
- break;
- case "new":
- H()
- }
- }
- function G(a, b) {
- var c;
- switch (a) {
- case "disconnect":
- c = "Stop";
- break;
- case "really":
- c = "Really?";
- break;
- case "new":
- c = "New"
- }
- void 0 !== b && (c += "...");
- N.set("text", c);
- N.grab(new Element("div", {
- "class": "btnkbshortcut",
- text: "Esc"
- }));
- hb = a;
- sa.removeClass("reallybtn");
- "new" === a ? sa.addClass("newbtn") : "really" === a && sa.addClass("reallybtn")
- }
- function Na() {}
- function ea() {
- null !== S && (clearTimeout(S), S = null);
- IS_MOBILE || q.focus();
- var a = q.value;
- if (a) {
- q.value = "";
- if (IS_MOBILE) {
- var b = q.clone();
- b.replaces(q);
- q = b;
- q.addEvent("focus", function() {
- u()
- })
- } else q.focus();
- Qa = "";
- p("you", a);
- k.sendMessage(a);
- G("disconnect")
- }
- }
- function da() {
- S = null;
- k.stopTyping()
- }
- $("appstore") && $("appstore").destroy();
- $("footer") && $("footer").destroy();
- f && shouldForceUnmonitored && (e = !0);
- mobileAdWrapper && mobileAdWrapper.setStyle("display", "none");
- stopFlashing();
- IS_MOBILE || startSpinner();
- var fa = new Date,
- wa = "string" === typeof b,
- Ma = !1,
- fb = !1;
- $(document.body).addClass("inconversation");
- a ? $(document.body).addClass("videochat") : $(document.body).removeClass("videochat");
- var W = new Element("div", {
- "class": "chatbox3"
- }),
- Z = new Element("div", {
- "class": "chatbox2"
- }),
- Ra = new Element("div", {
- "class": "chatbox"
- });
- IS_MOBILE && W.grab(logoElt);
- var ca = new Element("div", {
- "class": "logwrapper",
- styles: {
- top: contentTop + "px"
- }
- }),
- Sa = new Element("div", {
- "class": "logbox"
- }),
- ma = new Element("div");
- IS_MOBILE || ma.setStyles({
- position: "relative",
- "min-height": "100%"
- });
- Sa.grab(ma);
- ca.grab(Sa);
- var vb = new Element("div", {
- "class": "logwrapperpush"
- });
- ca.grab(vb);
- Ra.grab(ca);
- var qa = new Element("div", {
- "class": "controlwrapper"
- }),
- ib = new Element("table", {
- "class": "controltable",
- cellpadding: "0",
- cellspacing: "0",
- border: "0"
- }),
- jb = new Element("tbody"),
- za = new Element("tr"),
- Ta = new Element("td", {
- "class": "disconnectbtncell"
- }),
- sa = new Element("div", {
- "class": "disconnectbtnwrapper"
- }),
- N = new Element("button", {
- "class": "disconnectbtn"
- });
- sa.grab(N);
- Ta.grab(sa);
- za.grab(Ta);
- var kb = new Element("td", {
- "class": "chatmsgcell"
- }),
- Ua = new Element("div", {
- "class": "chatmsgwrapper"
- });
- if (IS_MOBILE) {
- var Aa = new Element("form");
- Aa.setStyles({
- margin: 0,
- padding: 0
- });
- Aa.addEvent("submit", function(a) {
- a.preventDefault();
- ea()
- });
- var q = new Element("input", {
- "class": "chatmsg disabled",
- disabled: !0,
- placeholder: "Type your message..."
- });
- q.addEvent("focus", function() {
- u()
- });
- Aa.grab(q);
- Ua.grab(Aa)
- } else q = new Element("textarea", {
- "class": "chatmsg disabled",
- cols: "80",
- rows: "3",
- disabled: !0
- }), Ua.grab(q);
- kb.grab(Ua);
- za.grab(kb);
- var lb = new Element("td", {
- "class": "sendbthcell"
- }),
- mb = new Element("div", {
- "class": "sendbtnwrapper"
- }),
- ha = new Element("button", {
- "class": "sendbtn",
- disabled: !0,
- text: "Send"
- });
- ha.grab(new Element("div", {
- "class": "btnkbshortcut",
- text: "Enter"
- }));
- mb.grab(ha);
- lb.grab(mb);
- IS_MOBILE || za.grab(lb);
- jb.grab(za);
- ib.grab(jb);
- qa.grab(ib);
- Ra.grab(qa);
- Z.grab(Ra);
- W.grab(Z);
- $(document.body).grab(W);
- $(document.body).scrollTop = $(document.body).scrollHeight;
- var ga = null,
- Ia = null,
- K = null,
- Ja = null,
- Ka = null;
- IS_MOBILE ? ($(document.body).addEvent("scroll", r), $(document).addEvent("scroll", r)) : ($(document).addEvent("keydown", g), $(document).addEvent("keyup", m));
- var k = new MetaBackend;
- scrollElt = IS_MOBILE ? document.body : Sa;
- for (var la = [], ua = !1, Ba = [{
- topics: ["reddit"],
- regex: /reddit/,
- url: "http://wawadmin.omegle.com/redir/reddit",
- text: "Psst... did you know Omegle has its own subreddit?",
- image: "/static/redditalien.png"
- }],
- Pa = null, P = 0; P < Ba.length; P++) {
- var I = Ba[P];
- I.priority || (I.priority = P);
- j(I)
- }
- Pa && j(Pa);
- if (isFirstChat) {
- for (P = 0; P < Ba.length; P++)
- if (I = Ba[P], I.topics)
- for (var Va = 0; Va < I.topics.length; Va++)
- if (topicManager.check(I.topics[Va])) {
- if (!IS_MOBILE || !I.noMobile)
- if (null === currentAffiliate || currentAffiliate.priority < I.priority) currentAffiliate = Q(I.tests, I);
- break
- }
- isFirstChat = !1
- }
- var eb = null,
- db = null,
- L = [],
- aa = null,
- gb = [],
- na = !1;
- if ($("logo") || logoElt)($("logo") || logoElt).addEvent("click", E), ($("logo") || logoElt).setStyle("cursor",
- "pointer");
- var ba = null,
- O = null,
- oa = null,
- z = function() {
- z = function() {
- return !0
- };
- return !1
- },
- pa = !1;
- k.addEvent("connectedToServer", function() {
- N.set("disabled", !1);
- window.onbeforeunload = ya;
- $(window).addEvent("unload", F)
- });
- k.addEvent("failedToConnect", function(a) {
- y("Error connecting to server. Please try again.");
- A();
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle connect error", a])
- });
- var X = null,
- Y = null,
- nb = !1,
- Wa = null;
- k.addEvent("waiting", function() {
- Wa = +new Date;
- serverManager.setKnownGood();
- if (wa) y("Looking for two strangers...");
- else {
- var a = new Element("div"),
- b = new Element("div", {
- text: "Looking for someone you can chat with..."
- });
- a.grab(b);
- if (Ca) {
- X = new Element("div", {
- "class": "commonlikescancel",
- text: "It may take a little while to find someone with common interests. If you get tired of waiting, you can "
- });
- var b = new Element("a", {
- href: "javascript:",
- text: "connect to a completely random stranger"
- }),
- c = function() {
- Y && (clearTimeout(Y), Y = null);
- X && (k.stopLookingForCommonLikes(), X.destroy(), X = null)
- };
- b.addEvent("click", c);
- X.grab(b);
- X.appendText(" instead.");
- a.grab(X);
- Y = setTimeout(function() {
- nb = !0;
- c()
- }, 1E4)
- }
- y(a)
- }
- });
- var bb = !1;
- k.addEvent("strangerConnected", function(b) {
- if (!pa) {
- null !== Wa && 1E3 < +new Date - Wa && startFlashing();
- bb = !0;
- serverManager.setKnownGood();
- if (a) try {
- $("flash").gotStrangerPeerID(b)
- } catch (c) {
- try {
- $("flash").gotStrangerPeerID(b)
- } catch (d) {}
- }
- Y && (clearTimeout(Y), Y = null);
- wa ? y("You're now watching two strangers discuss your question!", "You're watching two strangers discuss your question on Omegle!") : (b = new Date, b = 11 === b.getMonth() && 25 === b.getDate() ?
- "merry Christmas" : "hi", y("You're " + (IS_MOBILE ? "" : "now ") + "chatting with a random stranger. Say " + b + "!", "You're chatting with a random stranger on Omegle!"), nb && t("Omegle couldn't find anyone who shares interests with you, so this stranger is completely random. Try adding more interests!", !1, !1, !1), q.set("disabled", !1), q.removeClass("disabled"), ha.set("disabled", !1), IS_MOBILE || q.focus())
- }
- });
- k.addEvent("gotMessage", function(a) {
- D();
- a = a.replace(/^[\r\n]+/g, "");
- navigator.notification && navigator.notification.beep &&
- navigator.notification.beep(1);
- p("stranger", a)
- });
- k.addEvent("gotMessageHTML", function(a) {
- D();
- var b = new Element("p", {
- "class": "strangermsg"
- }),
- c = new Element("strong", {
- "class": "msgsource"
- });
- c.appendText("Stranger: ");
- b.grab(c);
- b.appendText(" ");
- a = new Element("span", {
- html: a
- });
- b.grab(a);
- v(b);
- ua || la.push(["Stranger:", a.get("text")])
- });
- k.addEvent("strangerDisconnected", function() {
- t("Stranger has disconnected.");
- A()
- });
- k.addEvent("typing", function() {
- M("Stranger")
- });
- k.addEvent("stoppedTyping", D);
- k.addEvent("recaptchaRequired",
- ia);
- k.addEvent("recaptchaRejected", ia);
- k.addEvent("connectionDied", function(a) {
- var b = "Technical error";
- a && (b += ": " + a + " Sorry. :( Omegle understands if you hate it now, but Omegle still loves you.");
- t(b);
- serverManager.unsetKnownGood();
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle error", a ? a : "(error)", k.server]);
- A()
- });
- k.addEvent("question", function(a) {
- var b = new Element("div", {
- "class": "question"
- }),
- c = new Element("div", {
- "class": "questionHeading",
- text: "Question to discuss:"
- });
- b.grab(c);
- c =
- new Element("div", {
- "class": "questionText"
- });
- c.appendText(a);
- b.grab(c);
- la.push(["Question to discuss:", a]);
- v(b)
- });
- k.addEvent("spyMessage", function(a, b) {
- var c = "Stranger 1" === a ? "youmsg" : "strangermsg";
- J(a);
- startFlashing();
- w(a, c, b)
- });
- k.addEvent("spyDisconnected", function(a) {
- t(a + " has disconnected");
- A()
- });
- k.addEvent("spyTyping", M);
- k.addEvent("spyStoppedTyping", J);
- k.addEvent("error", function(a) {
- t(a);
- A()
- });
- var cb = !1;
- k.addEvent("serverMessage", function(a) {
- -1 !== a.indexOf("language") && (cb = !0, !IS_MOBILE && "undefined" !==
- typeof googTr && (a += ' (Select "English" from the menu in the corner to disable.)'));
- t(a, !1)
- });
- k.addEvent("antinudeBanned", function(a) {
- t("Banned.");
- A();
- null !== z && z();
- top.location.href = a
- });
- var Xa = null,
- V = null;
- k.addEvent("commonLikes", function(a) {
- if (a.length) {
- V = a;
- for (var a = "You both like ", b = 0; b < V.length; b++) a += V[b], b < V.length - 1 && (a += ", "), b == V.length - 2 && (a += "and ");
- a += ".";
- Xa && Xa.destroy();
- Xa = t(a)
- }
- });
- k.addEvent("partnerCollege", function(a) {
- t("Stranger's college: " + a)
- });
- var La = null;
- k.addEvent("identDigests",
- function(a) {
- La = a
- });
- var hb = "disconnect";
- ha.addEvent("click", ea);
- G("disconnect");
- N.addEvent("click", ka);
- var Oa = !1,
- ra, xa;
- ! function() {
- if (Oa) return !0;
- if (IS_MOBILE || !e) return !1;
- Oa = !0;
- ra = new Element("td", {
- "class": "lowersexybtncell"
- });
- var b = new Element("div", {
- "class": "lowersexybtnwrapper"
- }),
- c = "unmon-lower-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
- c = c + (a ? "video" : "text"),
- d = new Element("button", {
- "class": "lowersexybtn",
- text: "Pervy Girls (Free, 18+)",
- events: {
- click: function(a) {
- a.preventDefault();
- z && z();
- window.open("http://wawadmin.omegle.com/redir/y?track=" +
- c)
- }
- }
- });
- b.grab(d);
- ra.grab(b);
- Ta.grab(ra, "after");
- xa = new Element("td", {
- "class": "lowergaybtncell"
- });
- var b = new Element("div", {
- "class": "lowergaybtnwrapper"
- }),
- f = new Element("button", {
- "class": "lowergaybtn",
- text: "\u00a0gay cams\u00a0 (free" + (e ? "" : ", 18+") + ")",
- events: {
- click: function(a) {
- a.preventDefault();
- z && z();
- window.open("http://wawadmin.omegle.com/redir/gay?track=" + c)
- }
- }
- });
- b.grab(f);
- xa.grab(b);
- ra.grab(xa, "after");
- "undefined" === typeof doUnmonSexyTest && (doUnmonSexyTest = 0.5 > Math.random());
- c += "-none-" + (doUnmonSexyTest ?
- "y" : "n");
- Na = function() {
- var a = ["\ud83d\udc8b *soft moan*", "adult cams (free)"];
- a[1] = "girl\u00a0cams \u00a0\u00a0(free)\u00a0\u00a0";
- for (var b = null;
- "string" !== typeof a;) b = Math.floor(Math.random() * a.length), a = a[b];
- d.set("text", a);
- chatOddEven ? (a = f, b = d) : (a = d, b = f);
- var c = "0 0 40px 10px #F0F inset",
- c = "";
- a.setStyles({
- "box-shadow": c,
- "-webkit-box-shadow": c,
- "-moz-box-shadow": c,
- background: "red",
- background: "#FF7F00"
- });
- lastActiveUnmonSexy = a;
- b.setStyles({
- "box-shadow": "none",
- "-webkit-box-shadow": "none",
- "-moz-box-shadow": "none",
- "font-weight": "normal",
- background: "white",
- color: "black"
- })
- };
- Na();
- return !0
- }() && !e && chatPervTrack.push(!1);
- "undefined" === typeof doAVCtest && (doAVCtest = 0.5 > Math.random());
- if (e && a) {
- if (!$("abovevideosexybtn")) {
- var ob = new Element("div", {
- styles: {
- background: "red",
- color: "white",
- "font-size": "30px",
- height: "30px",
- "line-height": "30px",
- "vertical-align": "middle",
- cursor: "pointer",
- "text-align": "center",
- padding: "10px 0",
- "margin-bottom": "10px",
- "border-radius": "20px"
- },
- id: "abovevideosexybtn",
- events: {
- click: function(a) {
- a.preventDefault();
- z && z();
- window.open("http://wawadmin.omegle.com/redir/y?track=avc-108-" + (doAVCtest ? "y" : "n"))
- }
- }
- });
- ob.appendText("What happens if click?");
- $("flashwrapper").grab(ob, "top")
- }
- } else $$("#abovevideosexybtn").dispose();
- if (a) {
- var Da = function(a) {
- var b = $("flash");
- if (ca.getSize && b.getPosition && $(window).getSize) {
- var c = $(window).getSize(),
- d = 520 * ca.getSize().y / 488,
- e = c.y - b.getPosition().y - 24;
- d > e && (d = e, !0 !== a && setTimeout(function() {
- Da(!0)
- }, 200));
- 320 > d && (d = 320);
- a = 320 * d / 520;
- a > c.x / 2 && (a = c.x / 2, d = 520 * a / 320);
- b.setStyles({
- width: Math.floor(a) +
- "px",
- height: Math.floor(d) + "px"
- });
- b.blur();
- (new Elements([qa, ca])).setStyle("margin-left", a + 8 + "px")
- }
- };
- Da();
- $(window).addEvent("resize", Da);
- ga = Da
- }
- var Qa = q.value,
- S = null;
- q.addEvent("keydown", function(a) {
- 13 == a.code && (!a.shift && !a.alt && !a.meta) && (ea(), a.preventDefault())
- });
- q.addEvent("keypress", function() {
- setTimeout(function() {
- q.value !== Qa && (Qa = q.value, null === S && k.typing(), null !== S && (clearTimeout(S), S = null), S = setTimeout(da, 5E3))
- }, 0)
- });
- y("Connecting to server...");
- var ta = null,
- Ca = !1,
- Ea = [],
- va = null,
- Ya = null,
- Fa = null,
- Za = !1;
- if (!c && !b && !e) {
- if (shouldUseLikes) {
- if (shouldUseFbLikes) var pb = FB.getAuthResponse(),
- ta = pb ? pb.accessToken : null;
- Ea = topicManager.list();
- Ca = Ea.length || null !== ta
- }
- "none" !== collegeMode && collegeAndAuth && (Za = "any" === collegeMode, Ya = collegeAndAuth[0], Fa = collegeAndAuth[1])
- }
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle chat", function() {
- var d = [];
- IS_MOBILE && d.push("mobile");
- b ? d.push("spy") : c ? d.push("spyee") : a ? (d.push("video"), flashWatermarkTrack && d.push(flashWatermarkTrack)) : d.push("text");
- e && (d.push("unmonitored"), shouldForceUnmonitored && d.push("(forced)"));
- Ca && (d.push("topical"), ta && d.push("(FB)"));
- "none" !== collegeMode && Fa && d.push("college");
- d[0] = d[0][0].toUpperCase() + d[0].substr(1);
- return d.join(" ")
- }()]);
- if (e) {
- "undefined" === typeof unmonChatCount && (unmonAdCount = unmonChatCount = 0);
- if (1 > unmonAdCount && 4 <= unmonChatCount) {
- unmonAdCount++;
- var qb = 0.5 > Math.random(),
- Ga = "gwfy9-" + (qb ? "y" : "n"),
- $a = new Element("div", {
- styles: {
- width: "40em",
- border: "1px solid #3F9FFF",
- "border-top-left-radius": "0.5em",
- "border-top-right-radius": "0.5em",
- overflow: "hidden"
- }
- }),
- rb = function() {
- ab("accept");
- window.open("http://wawadmin.omegle.com/redir/y?track=interchat-" + Ga)
- },
- ab = function(a) {
- (new Image).src = "http://wawadmin.omegle.com/redir/interchatexit?track=" + a + "-" + Ga
- },
- wb = new Element("div", {
- styles: {
- background: "#3F9FFF",
- color: "white",
- "font-size": "1.5em",
- padding: "0.3333em",
- "font-weight": "bold",
- "text-align": "center",
- "text-shadow": "0 0 15px #3F3F3F",
- "-webkit-text-shadow": "0 0 15px #3F3F3F",
- "-moz-text-shadow": "0 0 15px #3F3F3F",
- cursor: "pointer"
- },
- events: {
- click: rb
- },
- text: qb ? "A girl wants you" : "Girls want you"
- });
- $a.grab(wb);
- var ja = new Element("div", {
- styles: {
- padding: "0.5em",
- position: "relative",
- overflow: "hidden"
- }
- });
- ja.setStyle("padding-bottom", "3.5em");
- var xb = new Element("div", {
- html: ""
- });
- ja.grab(xb);
- var sb = new Element("div", {
- styles: {
- position: "absolute",
- right: 0,
- bottom: 0,
- "border-top": "1px solid #3F9FFF",
- "border-left": "1px solid #3F9FFF",
- padding: "0.5em",
- "text-align": "center",
- cursor: "pointer",
- height: "1em",
- position: "absolute",
- background: "white",
- color: "black"
- },
- events: {
- click: function() {
- ab("refuse");
- H()
- }
- }
- }),
- yb = new Element("span", {
- text: "No",
- styles: {
- "vertical-align": "middle"
- }
- });
- sb.grab(yb);
- var tb = new Element("div", {
- styles: {
- position: "absolute",
- bottom: 0,
- left: 0,
- background: "#3F9FFF",
- padding: "0.5em",
- "text-align": "center",
- color: "white",
- cursor: "pointer",
- height: "1.5em",
- "border-top": "1px solid #3F9FFF",
- "border-right": "1px solid #3F9FFF",
- width: "15.25em",
- "z-index": "1",
- "border-top-right-radius": "0.5em"
- },
- events: {
- click: rb
- }
- }),
- zb = new Element("span", {
- text: "Give me girls",
- styles: {
- "font-size": "1.5em",
- "vertical-align": "middle",
- "text-shadow": "0 0 15px #3F3F3F",
- "-webkit-text-shadow": "0 0 15px #3F3F3F",
- "-moz-text-shadow": "0 0 15px #3F3F3F"
- }
- });
- tb.grab(zb);
- ja.grab(sb);
- ja.grab(tb);
- var ub = new Element("div", {
- styles: {
- position: "absolute",
- bottom: 0,
- left: "15.75em",
- background: "#FF7F00",
- padding: "0.5em 0.5em 0.5em 1em",
- "text-align": "center",
- color: "white",
- cursor: "pointer",
- height: "1.5em",
- "border-top": "1px solid #FF7F00",
- "border-right": "1px solid #FF7F00",
- width: "15.25em",
- "border-top-right-radius": "0.5em",
- "z-index": "0"
- },
- events: {
- click: function() {
- ab("gayaccept");
- window.open("http://wawadmin.omegle.com/redir/gay?track=interchat-" + Ga)
- }
- }
- }),
- Ab = new Element("span", {
- text: "Free gay cams",
- styles: {
- "font-size": "1.5em",
- "vertical-align": "middle",
- "text-shadow": "0 0 15px #7F7F7F",
- "-webkit-text-shadow": "0 0 15px #7F7F7F",
- "-moz-text-shadow": "0 0 15px #7F7F7F"
- }
- });
- ub.grab(Ab);
- ja.grab(ub);
- $a.grab(ja);
- C($a);
- N.set("disabled", !0);
- (new Image).src = "http://wawadmin.omegle.com/redir/interchatenter?track=" + Ga;
- return
- }
- unmonChatCount++
- }
- var Ha =
- null;
- if (!shouldUseEnglish || Ca) "undefined" !== typeof googTr && googTr.e && "string" === typeof googTr.e && 2 <= googTr.e.length ? Ha = googTr.e.substr(0, 2) : "undefined" !== typeof navigator && "string" === typeof navigator.language && (Ha = navigator.language.substr(0, 2));
- if (a) {
- flashCb_gotNearID = function(a, b) {
- resetStratusCallbacks();
- k.connect(a, null, !1, !1, ta, Ea, e ? "unmon" : null, Ha, b, !1, Ya, Fa, Za)
- };
- flashCb_errorConnectingToStratus = function() {
- resetStratusCallbacks();
- y("Error connecting to Adobe Stratus. Please try again.");
- A()
- };
- try {
- $("flash").startChat(rtmfpServer)
- } catch (Bb) {
- try {
- $("flash").startChat(rtmfpServer)
- } catch (Cb) {
- A(), H(!1)
- }
- }
- e || (va = setTimeout(function() {
- va = null;
- var a = new Date;
- lastScreenshotTime && 6E4 > a - lastScreenshotTime || (lastScreenshotTime = a, Math.random() > screenshotPercent || $("flash") && ($("flash").postScreenshot && antinudeServers.length) && $("flash").postScreenshot(antinudeServers[$random(0, antinudeServers.length - 1)], 4, 300))
- }, $random(1500, 5E3)))
- } else k.connect(null, b, c, d, ta, Ea, e ? "unmon" : null, Ha, null, !1, Ya, Fa, Za);
- serverManager.unsetKnownGood()
- }
- var userMedia = null,
- WEB_RTC_CONFIG = {
- iceServers: [{
- url: "stun:stun.l.google.com:19302"
- }]
- },
- WEB_RTC_MEDIA_CONSTRAINTS = {
- mandatory: {
- OfferToReceiveAudio: !0,
- OfferToReceiveVideo: !0
- }
- },
- WEB_RTC_PEER_CONSTRAINTS = {
- optional: [{
- DtlsSrtpKeyAgreement: !0
- }]
- };
- window.RTCPeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
- window.RTCIceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate || window.webkitRTCIceCandidate;
- window.RTCSessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription || window.webkitRTCSessionDescription;
- navigator.getUserMedia = navigator.mozGetUserMedia || navigator.getUserMedia || navigator.webkitGetUserMedia;
- var logoShadowImg = null;
- function requestFullscreen(a) {
- a = a || document.documentElement;
- a.requestFullscreen ? a.requestFullscreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen()
- }
- function startMobileVideo() {
- function a(a) {
- a.preventDefault();
- for (var b = 0; b < a.changedTouches.length; b++) {
- var c = a.changedTouches[b];
- if (c.identifier === J) {
- if (T) {
- var a = c.pageX - p.clientWidth / 2,
- b = s.clientWidth,
- c = p.clientWidth,
- d = Math.max(b / 2, b - 300),
- a = Math.max(d, a);
- p.setStyle("left", a + "px");
- p.setStyle("right", "auto");
- w.setStyle("width", b - a - c + "px")
- } else a = c.pageY - p.clientHeight / 2, b = s.clientHeight, c = p.clientHeight, d = Math.max(b / 2, b - 300), a = Math.max(d, a), p.setStyle("top", a + "px"), p.setStyle("bottom", "auto"), w.setStyle("height",
- b - a - c + "px");
- b - a > 2.5 * c && C.setStyle("display", "none");
- D = a <= d;
- break
- }
- }
- }
- function b(c) {
- c.preventDefault();
- for (var d = 0; d < c.changedTouches.length; d++)
- if (c.changedTouches[d].identifier === J) {
- M = setTimeout(function() {
- M = null;
- C.setStyle("display", "none");
- B.set("display", H)
- }, 500);
- p.setStyle("background", "rgba(255, 0, 0, 0.5)");
- T ? (p.setStyle("left", "auto"), p.setStyle("right", 0), w.setStyle("width", 0)) : (p.setStyle("top", "auto"), p.setStyle("bottom", 0), w.setStyle("height", 0));
- w.setStyle("display", "none");
- window.removeEventListener("touchmove",
- a);
- window.removeEventListener("touchend", b);
- J = null;
- D && r();
- break
- }
- }
- function c() {
- var a = s.getSize();
- a.x > a.y ? (T = !0, p.setStyles({
- left: "auto",
- bottom: "auto",
- right: 0,
- top: "33.33%",
- width: "3em",
- height: "33.33%",
- "border-top-left-radius": "1em",
- "border-bottom-left-radius": "1em",
- "border-top-right-radius": 0,
- "border-bottom-right-radius": 0
- }), w.setStyles({
- left: "auto",
- bottom: "auto",
- right: 0,
- top: "33.33%",
- width: "0",
- height: "33.33%"
- })) : (T = !1, p.setStyles({
- top: "auto",
- right: "auto",
- bottom: 0,
- left: "33.33%",
- height: "3em",
- width: "33.33%",
- "border-top-left-radius": "1em",
- "border-bottom-left-radius": 0,
- "border-top-right-radius": "1em",
- "border-bottom-right-radius": 0
- }), w.setStyles({
- top: "auto",
- right: "auto",
- bottom: 0,
- left: "33.33%",
- height: 0,
- width: "33.33%"
- }))
- }
- function d(a, b) {
- var c = a.match(b);
- return c && 2 == c.length ? c[1] : null
- }
- function e(a) {
- for (var b = a.sdp, c = b.split("\r\n"), e = 0; e < c.length; e++)
- if (-1 !== c[e].search("m=audio")) {
- var f = e;
- break
- }
- if (null !== f) {
- for (e = 0; e < c.length; e++)
- if (-1 !== c[e].search("opus/48000")) {
- var g = d(c[e], /:(\d+) opus\/48000/i);
- if (g) {
- for (var b =
- c, e = f, i = c[f].split(" "), j = [], l = 0, m = 0; m < i.length; m++) 3 === l && (j[l++] = g), i[m] !== g && (j[l++] = i[m]);
- g = j.join(" ");
- b[e] = g
- }
- break
- }
- b = c[f].split(" ");
- for (e = c.length - 1; 0 <= e; e--)
- if (g = d(c[e], /a=rtpmap:(\d+) CN\/\d+/i)) g = b.indexOf(g), -1 !== g && b.splice(g, 1), c.splice(e, 1);
- c[f] = b.join(" ");
- b = c.join("\r\n")
- }
- a.sdp = b;
- E.setLocalDescription(a);
- F.sendRTCPeerDescription(a)
- }
- function f() {
- if (!ia) {
- ia = !0;
- try {
- E.close()
- } catch (a) {}
- Q.dispose();
- p.setStyle("display", "none");
- w.setStyle("display", "none");
- H = "table";
- B.setStyle("display",
- "table");
- var b = new Element("span", {
- styles: {
- padding: "0.5em",
- background: "#007fff",
- color: "white",
- "font-weight": "bold",
- "border-radius": "0.5em",
- "-webkit-border-radius": "0.5em"
- },
- text: ">> New chat >>",
- events: {
- click: function() {
- i();
- startMobileVideo()
- }
- }
- }),
- b = (new Element("div", {
- styles: {
- height: "3em",
- "line-height": "3"
- }
- })).grab(b);
- v.grab(b);
- if (mobileAdWrapper && mobileAdWrapperSize && mobileAdWrapperSize.y) {
- var c = new Element("div", {
- styles: {
- width: mobileAdWrapperSize.x + "px",
- height: mobileAdWrapperSize.y + "px",
- margin: Math.floor(mobileAdWrapperSize.y /
- 4) + "px auto"
- }
- });
- v.grab(c);
- mobileAdWrapper.setStyles({
- position: "absolute",
- display: "block",
- background: "red",
- "z-index": "1000"
- });
- mobileAdWrapper.setPosition(c.getPosition());
- l = function() {
- mobileAdWrapper.setPosition(c.getPosition())
- };
- window.addEvent("resize", l);
- setTimeout(l, 0);
- setTimeout(l, 1);
- setTimeout(l, 10);
- setTimeout(l, 100)
- }
- b = new Element("a", {
- text: "(Back to homepage)",
- href: "javascript:",
- events: {
- click: function(a) {
- a.preventDefault();
- i();
- showIntro()
- }
- },
- styles: {
- color: "#3f9fff"
- }
- });
- b = (new Element("div", {
- styles: {
- "margin-top": mobileAdWrapper &&
- mobileAdWrapperSize && mobileAdWrapperSize.y ? 0 : "1.5em"
- }
- })).grab(b);
- v.grab(b);
- $(window).removeEvent("unload", r)
- }
- }
- function i() {
- $(window).removeEvent("resize", c);
- l && $(window).removeEvent("resize", l);
- s.dispose()
- }
- function g(a) {
- ia || (t.set("text", a), ka && F.disconnect(), f())
- }
- function m() {
- g("Connection error. :-(")
- }
- function r() {
- g("You disconnected.")
- }
- function u() {
- j.src = window.URL && URL.createObjectURL ? URL.createObjectURL(userMedia) : userMedia;
- E.addStream(userMedia);
- t.set("text", "Connecting...");
- ka = !0;
- F.connect(null,
- null, !1, !1, null, null, null, null, null, !0)
- }
- $("header") && (savedHeader = $("header"), $("header").dispose());
- $("intro") && (savedIntro = $("intro"), $("intro").dispose());
- $("footer") && $("footer").dispose();
- $("mobileadwrapper") && $("mobileadwrapper").setStyle("display", "none");
- var l = null,
- s = new Element("div", {
- styles: {
- background: "black",
- width: "100%",
- height: "100%",
- position: "relative",
- overflow: "hidden"
- }
- }),
- Q = new Element("video", {
- autoplay: !0,
- styles: {
- position: "absolute",
- left: 0,
- top: 0,
- width: "100%",
- height: "100%"
- }
- });
- s.grab(Q);
- var j = new Element("video", {
- autoplay: !0,
- muted: !0,
- styles: {
- position: "absolute",
- left: 0,
- bottom: 0,
- width: "100px",
- height: "100px"
- }
- });
- s.grab(j);
- var B = new Element("div", {
- styles: {
- display: "table",
- position: "absolute",
- width: "100%",
- height: "100%"
- }
- }),
- v = new Element("div", {
- styles: {
- display: "table-cell",
- width: "100%",
- height: "100%",
- "vertical-align": "middle",
- "text-align": "center",
- color: "white",
- "font-size": "2em"
- }
- }),
- t = new Element("div", {
- styles: {
- "text-shadow": "white 0 0 0.5em"
- }
- });
- v.grab(t);
- B.grab(v);
- s.grab(B);
- var C = new Element("div", {
- styles: {
- position: "absolute",
- width: "100%",
- height: "100%",
- display: "none"
- }
- }),
- y = new Element("div", {
- styles: {
- display: "table-cell",
- width: "100%",
- height: "100%",
- "text-align": "center",
- "vertical-align": "middle",
- color: "white",
- "text-shadow": "0 0 0.5em black"
- },
- text: "Slide to confirm."
- });
- C.grab(y);
- s.grab(C);
- var w = new Element("div", {
- styles: {
- background: "#7F0000",
- position: "absolute",
- display: "none"
- }
- });
- s.grab(w);
- var p = new Element("div", {
- styles: {
- background: "red",
- color: "white",
- position: "absolute",
- display: "table"
- }
- });
- p.setStyle("background",
- "rgba(255, 0, 0, 0.5)");
- y = new Element("div", {
- styles: {
- display: "table-cell",
- "vertical-align": "middle",
- "text-align": "center"
- },
- text: "Stop"
- });
- p.grab(y);
- var J = null,
- D = !1,
- M = null;
- p.addEventListener("touchstart", function(c) {
- c.preventDefault();
- p.setStyle("background", "red");
- D = !1;
- w.setStyle("display", "block");
- null === J && (window.addEventListener("touchend", b), window.addEventListener("touchmove", a), C.setStyle("display", "table"), B.setStyle("display", "none"), null !== M && (clearTimeout(M), M = null));
- J = c.changedTouches[0].identifier
- });
- p.addEvent("click", r);
- s.grab(p);
- var T = !0;
- null === logoShadowImg && (logoShadowImg = new Element("img", {
- src: "/static/dotcomlogoshadow" + (window.devicePixelRatio && 1 < window.devicePixelRatio ? "@2x" : "") + ".png",
- width: 175,
- height: 49
- }));
- s.grab((new Element("div", {
- styles: {
- position: "absolute",
- top: 0,
- left: 0,
- width: "100%",
- "text-align": "center",
- opacity: "0.5"
- }
- })).grab(logoShadowImg));
- $(document.body).grab(s);
- requestFullscreen();
- c();
- $(window).addEvent("resize", c);
- var H = "table",
- E = new RTCPeerConnection(WEB_RTC_CONFIG, WEB_RTC_PEER_CONSTRAINTS);
- console.log("test");
- E.onaddstream = function(a) {
- console.log("stream added");
- H = "none";
- B.setStyle("display", "none");
- stopSlideRequired = !0;
- Q.src = window.URL && URL.createObjectURL ? URL.createObjectURL(a.stream) : a.stream;
- Q.play();
- "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle chat", "WebRTC video"])
- };
- var U = [],
- A = null;
- E.onicecandidate = function(a) {
- null !== A && (clearTimeout(A), A = null);
- a.candidate ? (U.push(a.candidate), setTimeout(function() {
- U.length && (console.log(U), F.sendICECandidates(U), U = []);
- A = null
- },
- 300)) : U.length && (F.sendICECandidates(U), U = [])
- };
- E.onstatechange = function() {
- ("closing" === E.readyState || "closed" === E.readyState) && m()
- };
- var ia = !1,
- F = new MetaBackend,
- ya = !1;
- F.addEvent("strangerDisconnected", function() {
- t.set("text", "Stranger disconnected.");
- f()
- });
- F.addEvent("icecandidate", function(a) {
- try {
- E.addIceCandidate(new RTCIceCandidate(a))
- } catch (b) {
- console.log("unhappy ice candidate:", a)
- }
- });
- F.addEvent("rtccall", function() {
- ya = !0;
- E.createOffer(e, m, WEB_RTC_MEDIA_CONSTRAINTS)
- });
- F.addEvent("rtcpeerdescription",
- function(a) {
- a = new RTCSessionDescription(a);
- E.setRemoteDescription(a);
- ya || setTimeout(function() {
- E.createAnswer(function(a) {
- e(a)
- }, m, WEB_RTC_MEDIA_CONSTRAINTS)
- }, 0)
- });
- var ka = !1;
- F.addEvent("connectionDied", m);
- F.addEvent("failedToConnect", m);
- $(window).addEvent("unload", r);
- t.set("text", "Enable camera...");
- null === userMedia ? navigator.getUserMedia({
- video: !0,
- audio: !0
- }, function(a) {
- userMedia = a;
- u()
- }, function() {
- g("Camera error. :-(")
- }) : u()
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement