Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 135.61 KB | None | 0 0
  1. window.onerror = function(a, b, c) {
  2. "undefined" === typeof _gaq && (_gaq = []);
  3. _gaq.push(["_trackEvent", "JSerror", b + ":" + c, a + ""])
  4. };
  5. top.location != document.location && (top.location.href = document.location.href);
  6. var doStartFlash = 0.5 > Math.random(),
  7. IE_URL_MAX_LENGTH = 2E3;
  8. "undefined" === typeof IS_MOBILE && (IS_MOBILE = !1);
  9. var splitDomain = document.domain.split(".");
  10. 1 < splitDomain.length && (document.domain = splitDomain[splitDomain.length - 2] + "." + splitDomain[splitDomain.length - 1]);
  11. var collegeJustEnabled = !1;
  12. "#dormon" === window.location.hash && (collegeJustEnabled = !0, window.location.hash = "#", window.location.hash = "");
  13. var aurrp = Cookie.read("aurrp"),
  14. aurrp = null === aurrp ? !0 : "1" === aurrp,
  15. shouldUseLikes = Cookie.read("uselikes"),
  16. shouldUseLikes = null === shouldUseLikes ? !0 : "1" === shouldUseLikes,
  17. shouldUseEnglish = Cookie.read("useenglish"),
  18. shouldUseEnglish = null === shouldUseEnglish ? !1 : "1" === shouldUseEnglish,
  19. randID = Cookie.read("randid");
  20. if (!randID || 8 !== randID.length) randID = function() {
  21. for (var a = "", b = 0; 8 > b; b++) var c = Math.floor(32 * Math.random()),
  22. a = a + "23456789ABCDEFGHJKLMNPQRSTUVWXYZ".charAt(c);
  23. return a
  24. }();
  25. Cookie.write("randid", randID, {
  26. duration: 365,
  27. domain: document.domain,
  28. path: "/"
  29. });
  30. var collegeAndAuth = Cookie.read("college");
  31. if (collegeAndAuth) {
  32. if (Cookie.write("college", collegeAndAuth, {
  33. duration: 365,
  34. domain: document.domain,
  35. path: "/"
  36. }), collegeAndAuth = JSON.decode(collegeAndAuth), "object" !== typeof collegeAndAuth || null === collegeAndAuth || 2 !== collegeAndAuth.length) collegeAndAuth = null
  37. } else collegeAndAuth = null;
  38. var collegeMode = Cookie.read("collegemode");
  39. "my" !== collegeMode && ("any" !== collegeMode && "none" !== collegeMode) && (collegeMode = "any");
  40.  
  41. function setCollegeMode(a) {
  42. collegeMode = a;
  43. Cookie.write("collegemode", collegeMode, {
  44. duration: 365,
  45. domain: document.domain,
  46. path: "/"
  47. })
  48. }
  49.  
  50. function clearCollegeSetting() {
  51. Cookie.write("college", "", {
  52. duration: 365,
  53. domain: document.domain,
  54. path: "/"
  55. });
  56. Cookie.write("collegemode", "", {
  57. duration: 365,
  58. domain: document.domain,
  59. path: "/"
  60. });
  61. collegeAndAuth = null;
  62. collegeMode = "any"
  63. }
  64. var shouldUseFbLikes, firstChatTrackCode = null,
  65. contentTop, logoElt, likeButtonElement = null,
  66. newChatButton = new Element("img", {
  67. width: 170,
  68. height: 50,
  69. alt: "New chat",
  70. styles: {
  71. cursor: "pointer",
  72. "vertical-align": "middle"
  73. }
  74. });
  75. window.devicePixelRatio && 1 < window.devicePixelRatio ? newChatButton.set("src", "/static/newchatbtn@2x.png") : newChatButton.set("src", "/static/newchatbtn.png");
  76. var unmonSexyButton = null,
  77. unmonGayButton = null;
  78. if (IS_MOBILE) {
  79. var bwLogo = new Element("img", {
  80. width: 77,
  81. height: 16,
  82. alt: ""
  83. });
  84. window.devicePixelRatio && 1 < window.devicePixelRatio ? bwLogo.set("src", "/static/bwlogo@2x.png") : bwLogo.set("src", "/static/bwlogo.png")
  85. }
  86. var COMETBackend = new Class({
  87. Implements: [Options, Events],
  88. initialize: function(a) {
  89. this.setOptions(a);
  90. this.clientID = null;
  91. this.stopped = !1
  92. },
  93. connect: function(a, b, c, d, e, f, i, g, m, r, u, l, s, Q) {
  94. var j = this;
  95. j.server = a;
  96. j.stratusNearID = b;
  97. j.askedQuestion = c;
  98. j.wantsSpy = d;
  99. j.canSaveQuestion = e;
  100. j.fbAccessToken = f;
  101. j.topics = i;
  102. j.group = g;
  103. j.lang = m;
  104. j.camera = r;
  105. j.enableWebRTC = u;
  106. j.college = l;
  107. j.collegeAuth = s;
  108. j.anyCollege = Q;
  109. subdomainManager.subdomainWindow(a, function(a) {
  110. j.reqWindow = a;
  111. j.gotReqWindow()
  112. })
  113. },
  114. resume: function(a, b) {
  115. var c = this;
  116. c.server = a;
  117. c.clientID = b;
  118. subdomainManager.subdomainWindow(a, function(a) {
  119. c.reqWindow = a;
  120. c.getEvents()
  121. })
  122. },
  123. gotReqWindow: function() {
  124. var a = this,
  125. b = subdomainManager.fixUrl(a.server, "/start?rcs=1&firstevents=1&spid=" + (a.stratusNearID || "") + "&randid=" + randID + (IS_MOBILE ? "&m=1" : ""));
  126. "string" === typeof a.askedQuestion && (b += "&ask=" + encodeURIComponent(a.askedQuestion));
  127. "string" === typeof a.fbAccessToken && (b += "&fbaccesstoken=" + encodeURIComponent(a.fbAccessToken));
  128. a.wantsSpy && (b += "&wantsspy=1");
  129. a.canSaveQuestion && (b +=
  130. "&cansavequestion=1");
  131. a.topics && a.topics.length && (b += "&topics=" + encodeURIComponent(JSON.encode(a.topics)));
  132. a.group && (b += "&group=" + encodeURIComponent(a.group));
  133. a.lang && (b += "&lang=" + encodeURIComponent(a.lang));
  134. a.camera && (b += "&camera=" + encodeURIComponent(a.camera));
  135. a.enableWebRTC && (b += "&webrtc=1");
  136. a.college && (b += "&college=" + encodeURIComponent(a.college));
  137. a.collegeAuth && (b += "&college_auth=" + encodeURIComponent(a.collegeAuth));
  138. a.anyCollege && (b += "&any_college=1");
  139. var c = null,
  140. d = killHeaders(new a.reqWindow.Request.JSON({
  141. url: b,
  142. onSuccess: function(b) {
  143. null !== c && (clearTimeout(c), c = null);
  144. b.clientID ? (a.clientID = b.clientID, a.fireEvent("connectedToServer"), b.events && a.gotEvents(b.events), a.getEvents()) : a.fireEvent("permanentlyFailedToConnect")
  145. },
  146. onFailure: function() {
  147. null !== c && (clearTimeout(c), c = null);
  148. a.fireEvent("failedToConnect")
  149. }
  150. })),
  151. c = setTimeout(function() {
  152. c = null;
  153. d.cancel();
  154. a.fireEvent("failedToConnect")
  155. }, 15E3);
  156. d.post()
  157. },
  158. getEvents: function(a) {
  159. void 0 === a && (a = 0);
  160. if (!this.stopped) {
  161. 2 < a && (this.fireEvent("connectionDied", "Lost contact with server, and couldn't reach it after 3 tries."),
  162. this.stopped = !0);
  163. var b = this,
  164. c = null,
  165. d = killHeaders(new b.reqWindow.Request.JSON({
  166. url: subdomainManager.fixUrl(b.server, "/events"),
  167. onSuccess: function(a) {
  168. null !== c && (clearTimeout(c), c = null);
  169. 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()))
  170. },
  171. onFailure: function() {
  172. null !== c && (clearTimeout(c), c = null);
  173. setTimeout(function() {
  174. b.getEvents(a + 1)
  175. }, 2500)
  176. }
  177. }));
  178. d.post({
  179. id: this.clientID
  180. });
  181. c = setTimeout(function() {
  182. c =
  183. null;
  184. d.cancel();
  185. b.getEvents(a)
  186. }, 62E3)
  187. }
  188. },
  189. gotEvents: function(a) {
  190. var b = this;
  191. $each(a, function(a) {
  192. switch (a[0]) {
  193. case "waiting":
  194. b.fireEvent("waiting");
  195. break;
  196. case "connected":
  197. b.fireEvent("strangerConnected", a[1]);
  198. break;
  199. case "gotMessage":
  200. b.fireEvent("gotMessage", a[1]);
  201. break;
  202. case "strangerDisconnected":
  203. b.stopped = !0;
  204. b.fireEvent("strangerDisconnected");
  205. break;
  206. case "typing":
  207. b.fireEvent("typing");
  208. break;
  209. case "stoppedTyping":
  210. b.fireEvent("stoppedTyping");
  211. break;
  212. case "recaptchaRequired":
  213. b.fireEvent("recaptchaRequired",
  214. a[1]);
  215. break;
  216. case "recaptchaRejected":
  217. b.fireEvent("recaptchaRejected", a[1]);
  218. break;
  219. case "count":
  220. onlineCountUpdated(a[1]);
  221. break;
  222. case "spyMessage":
  223. b.fireEvent("spyMessage", [a[1], a[2]]);
  224. break;
  225. case "spyTyping":
  226. b.fireEvent("spyTyping", a[1]);
  227. break;
  228. case "spyStoppedTyping":
  229. b.fireEvent("spyStoppedTyping", a[1]);
  230. break;
  231. case "spyDisconnected":
  232. b.stopped = !0;
  233. b.fireEvent("spyDisconnected", a[1]);
  234. break;
  235. case "question":
  236. b.fireEvent("question", a[1]);
  237. break;
  238. case "serverMessage":
  239. b.fireEvent("serverMessage", a[1]);
  240. break;
  241. case "error":
  242. b.stopped = !0;
  243. b.fireEvent("error", a[1]);
  244. break;
  245. case "commonLikes":
  246. b.fireEvent("commonLikes", [a[1]]);
  247. break;
  248. case "antinudeBanned":
  249. b.stopped = !0;
  250. b.fireEvent("antinudeBanned", [a[1]]);
  251. break;
  252. case "statusInfo":
  253. gotServerStatus(a[1]);
  254. break;
  255. case "identDigests":
  256. b.fireEvent("identDigests", [a[1]]);
  257. break;
  258. case "icecandidate":
  259. b.fireEvent("icecandidate", [a[1]]);
  260. break;
  261. case "rtccall":
  262. b.fireEvent("rtccall");
  263. break;
  264. case "rtcpeerdescription":
  265. b.fireEvent("rtcpeerdescription", [a[1]]);
  266. break;
  267. case "partnerCollege":
  268. b.fireEvent("partnerCollege", [a[1]])
  269. }
  270. })
  271. },
  272. sendMessage: function(a) {
  273. this.sendPOST("/send", {
  274. msg: a
  275. })
  276. },
  277. typing: function() {
  278. this.sendPOST("/typing")
  279. },
  280. stopTyping: function() {
  281. this.sendPOST("/stoppedtyping")
  282. },
  283. submitRecaptcha: function(a, b) {
  284. this.sendPOST("/recaptcha", {
  285. challenge: a,
  286. response: b
  287. })
  288. },
  289. disconnect: function() {
  290. this.sendPOST("/disconnect");
  291. this.stopped = !0
  292. },
  293. stopLookingForCommonLikes: function() {
  294. this.sendPOST("/stoplookingforcommonlikes")
  295. },
  296. sendRTCPeerDescription: function(a) {
  297. this.sendPOST("/rtcpeerdescription", {
  298. desc: JSON.encode(a)
  299. })
  300. },
  301. sendICECandidates: function(a) {
  302. for (var b =
  303. "id=" + encodeURIComponent(this.clientID), c = 0; c < a.length; c++) b += "&candidate=" + encodeURIComponent(JSON.encode(a[c]));
  304. this.sendPOST("/icecandidate", b)
  305. },
  306. sendPOST: function(a, b, c) {
  307. b = b || {};
  308. c = c || 0;
  309. "object" === typeof b && (b.id = this.clientID);
  310. var d = this;
  311. killHeaders(new this.reqWindow.Request({
  312. url: subdomainManager.fixUrl(this.server, a),
  313. data: b,
  314. onFailure: function() {
  315. 3 > c && d.sendPOST(a, b, c + 1)
  316. }
  317. })).send()
  318. }
  319. }),
  320. flashCb_socketConnected, flashCb_socketGotPacket, flashCb_socketClosed, flashCb_socketError;
  321.  
  322. function resetFlashSocketCallbacks() {
  323. flashCb_socketConnected = function() {};
  324. flashCb_socketGotPacket = function() {};
  325. flashCb_socketClosed = function() {};
  326. flashCb_socketError = function() {}
  327. }
  328.  
  329. function parseQueryString(a) {
  330. for (var b = {}, a = a.split("&"), c = 0; c < a.length; c++) {
  331. var d = a[c].split("="),
  332. e = decodeURIComponent(d[0].replace(/\+/g, " ")),
  333. d = decodeURIComponent(d[1].replace(/\+/g, " "));
  334. b[e] = d
  335. }
  336. return b
  337. }
  338.  
  339. function middotify(a) {
  340. for (var b = new Element("span"), c = 0; c < a.length; c++) 0 < c && b.appendText(" \u2022\u00a0"), b.grab(a[c]);
  341. return b
  342. }
  343. var flashSocketsWillWork = "yes" === Cookie.read("flashsocketswork"),
  344. flashSocketsWork = !1;
  345.  
  346. function setFlashSocketsWorkCookie() {
  347. Cookie.write("flashsocketswork", "yes", {
  348. duration: 1 / 12,
  349. domain: document.domain,
  350. path: "/"
  351. })
  352. }
  353.  
  354. function flashCb_socketsWork() {
  355. flashSocketsWork = !0;
  356. setFlashSocketsWorkCookie()
  357. }
  358. var MetaBackend = new Class({
  359. Implements: [Options, Events],
  360. initialize: function(a) {
  361. this.setOptions(a);
  362. this.numResumes = 0;
  363. this.stopped = !1;
  364. this.server = null
  365. },
  366. plugInBackend: function() {
  367. var a = this;
  368. $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(" "),
  369. function(b) {
  370. a.backend.addEvent(b, function() {
  371. if ("strangerDisconnected" === b || "error" === b || "spyDisconnected" === b || "antinudeBanned" === b) a.stopped = a.backend.stopped;
  372. a.fireEvent(b, arguments)
  373. })
  374. });
  375. a.backend.addEvent("connectionDied", function() {
  376. serverManager.unsetKnownGood();
  377. if (a.backend.clientID && 3 > a.numResumes && !a.stopped) {
  378. a.numResumes++;
  379. var b = a.backend.clientID;
  380. a.backend.removeEvents();
  381. a.backend = new COMETBackend;
  382. a.plugInBackend();
  383. a.server = serverManager.pickServer();
  384. a.backend.resume(a.server, b)
  385. } else a.stopped = !0, a.fireEvent("connectionDied", arguments)
  386. });
  387. a.backend.addEvent("connectionPermanentlyDied", function() {
  388. serverManager.unsetKnownGood();
  389. a.stopped = !0;
  390. a.fireEvent("connectionDied", arguments)
  391. });
  392. a.backend.addEvent("failedToConnect", function() {
  393. serverManager.unsetKnownGood();
  394. 3 > a.numResumes ? (a.numResumes++, a.backend.removeEvents(), a.connect.apply(a, a.connectArgs)) : (a.stopped = !0, a.fireEvent("failedToConnect", a.backend.server))
  395. });
  396. a.backend.addEvent("permanentlyFailedToConnect", function() {
  397. serverManager.unsetKnownGood();
  398. a.stopped = !0;
  399. a.fireEvent("failedToConnect", a.backend.server)
  400. })
  401. },
  402. connect: function() {
  403. this.backend = new COMETBackend;
  404. this.plugInBackend();
  405. this.server = serverManager.pickServer();
  406. this.connectArgs = arguments;
  407. for (var a = [this.server], b = 0; b < arguments.length; b++) a.push(arguments[b]);
  408. this.backend.connect.apply(this.backend, a)
  409. },
  410. sendMessage: function(a) {
  411. this.backend.sendMessage(a)
  412. },
  413. typing: function() {
  414. this.backend.typing()
  415. },
  416. stopTyping: function() {
  417. this.backend.stopTyping()
  418. },
  419. disconnect: function() {
  420. this.stopped = !0;
  421. this.backend &&
  422. this.backend.disconnect()
  423. },
  424. submitRecaptcha: function(a, b) {
  425. this.backend.submitRecaptcha(a, b)
  426. },
  427. stopLookingForCommonLikes: function() {
  428. this.backend.stopLookingForCommonLikes()
  429. },
  430. sendRTCPeerDescription: function(a) {
  431. this.backend.sendRTCPeerDescription(a)
  432. },
  433. sendICECandidates: function(a) {
  434. this.backend.sendICECandidates(a)
  435. }
  436. }),
  437. savedIntro = null,
  438. savedHeader = null;
  439.  
  440. function startFirstChat(a, b, c, d, e) {
  441. IS_MOBILE ? (logoElt = $("logo"), savedHeader = $("header"), $("header").dispose(), contentTop = 0) : (contentTop = $("intro").offsetTop, $$("#headerappstore").setStyle("visibility", "visible"));
  442. firstChatTrackCode && ((new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=" + (e ? "unmon-" + (shouldForceUnmonitored ? "" : "not") + "forced-" : "mon-") + (a ? "videoy-" : "videon-") + encodeURIComponent(firstChatTrackCode));
  443. savedIntro = $("intro");
  444. $("google_translate_upper_container") && ($("google_translate_upper_container").grab &&
  445. $("google_translate_wrapper")) && $("google_translate_upper_container").grab($("google_translate_wrapper"));
  446. $("intro").dispose();
  447. for (var f = Array.prototype.slice.call(arguments); 5 > f.length;) f.push(void 0);
  448. f.push(!0);
  449. startNewChat.apply(null, f)
  450. }
  451.  
  452. function showIntro() {
  453. savedHeader && !$("header") && (logoElt && savedHeader.grab(logoElt, "top"), $(document.body).grab(savedHeader));
  454. savedIntro && $(document.body).grab(savedIntro);
  455. if (IS_MOBILE)
  456. for (var a = 0; 300 >= a; a += 50) setTimeout(function() {
  457. scrollTo(0, 1)
  458. }, a);
  459. else $$("#headerappstore").setStyle("visibility", "hidden");
  460. mobileAdWrapper && $("mobileadwrapper2") && mobileAdWrapper.setStyles({
  461. display: "block",
  462. top: $("mobileadwrapper2").getPosition().y + "px"
  463. });
  464. a = makeTopicSettings(!0);
  465. $("topicsettingscontainer") && ($("topicsettingscontainer").empty(),
  466. $("topicsettingscontainer").grab(a))
  467. }
  468.  
  469. function commify(a) {
  470. var b = "",
  471. c;
  472. do {
  473. c = (a % 1E3).toString();
  474. for (a = Math.floor(a / 1E3); 0 != a && 3 > c.length;) c = "0" + c;
  475. b = c + b;
  476. a && (b = "," + b)
  477. } while (0 != a);
  478. return b
  479. }
  480.  
  481. function onlineCountUpdated(a) {
  482. var b = $("onlinecount");
  483. 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)
  484. }
  485.  
  486. function randomSpyMode() {
  487. return 0.25 > Math.random() ? "spy" : "spyee"
  488. }
  489. var idealSpyMode = randomSpyMode(),
  490. firstStatusUpdate = !0,
  491. antinudeServers = [],
  492. lastScreenshotTime = null,
  493. screenshotPercent = 0,
  494. shouldForceUnmonitored = !1;
  495.  
  496. function forceUnmon() {
  497. if (!IS_MOBILE && !shouldForceUnmonitored) {
  498. shouldForceUnmonitored = !0;
  499. var a = $("intro") || savedIntro;
  500. if (a) {
  501. a.getElementById("monitoringnotice") && a.getElementById("monitoringnotice").dispose();
  502. var b = new Element("div", {
  503. id: "monitoringnotice"
  504. });
  505. a.getElementById("chattypes").grab(b, "before");
  506. b.addClass("banned");
  507. var c = new Element("p", {
  508. html: "Your computer/network is <strong>banned</strong> for possible bad behavior."
  509. }),
  510. d = new Element("p", {
  511. "class": "extrainfo",
  512. html: "<strong>You can still use Omegle</strong>, but only the unmonitored section. <strong>You must be 18 or older.</strong>"
  513. }),
  514. e = new Element("p", {
  515. "class": "extrainfo",
  516. html: "(If you didn't do anything wrong, sorry! Mistakes happen sometimes. Your ban won't last forever.)"
  517. });
  518. b.grab(c);
  519. b.grab(d);
  520. b.grab(e);
  521. a.getElements("#tryspymode, #intoheadercell, #topicsettingscell, #spymodebtn, #videobtnunmoderated").dispose();
  522. b = "/static/pornbtn";
  523. b = window.devicePixelRatio && 1 < window.devicePixelRatio ? b + "@2x.png?xx" : b + ".png?xx";
  524. c = new Element("img", {
  525. src: b,
  526. width: 124,
  527. height: 50,
  528. id: "girlsbtn"
  529. });
  530. b = new Element("td");
  531. b.grab(c);
  532. var f = firstChatTrackCode ?
  533. "-" + firstChatTrackCode : "";
  534. c.addEvent("click", function() {
  535. window.open("http://wawadmin.omegle.com/redir/y?track=homepage-ban" + f)
  536. });
  537. c = new Element("td", {
  538. "class": "chattypeorcell",
  539. text: "or"
  540. });
  541. d = "/static/gaybtnorange";
  542. d = window.devicePixelRatio && 1 < window.devicePixelRatio ? d + "@2x.png" : d + ".png";
  543. e = new Element("img", {
  544. src: d,
  545. width: 124,
  546. height: 50,
  547. id: "gaybtn"
  548. });
  549. d = new Element("td");
  550. d.grab(e);
  551. e.addEvent("click", function() {
  552. window.open("http://wawadmin.omegle.com/redir/gay?track=homepage-ban")
  553. });
  554. new Element("td", {
  555. "class": "chattypeorcell",
  556. text: "or"
  557. });
  558. e = new Element("tr");
  559. e.grab(b);
  560. e.grab(c);
  561. e.grab(d);
  562. a.getElement("#chattypes tbody").grab(e)
  563. }
  564. }
  565. }
  566. var serverStatusTimeout = null;
  567.  
  568. function updateServerStatus() {
  569. serverStatusTimeout && (clearTimeout(serverStatusTimeout), serverStatusTimeout = null);
  570. var a = serverManager.pickServer();
  571. subdomainManager.subdomainWindow(a, function(b) {
  572. killHeaders(new b.Request.JSON({
  573. url: subdomainManager.fixUrl(a, "/status"),
  574. onSuccess: function(a) {
  575. gotServerStatus(a)
  576. },
  577. onFailure: function() {
  578. serverManager.unsetKnownGood();
  579. serverStatusTimeout = setTimeout(updateServerStatus, 1500)
  580. }
  581. })).get({
  582. nocache: Math.random(),
  583. randid: randID
  584. })
  585. })
  586. }
  587. var rtmfpServer = "rtmfp://p2p.rtmfp.net";
  588.  
  589. function gotServerStatus(a) {
  590. serverStatusTimeout && (clearTimeout(serverStatusTimeout), serverStatusTimeout = null);
  591. onlineCountUpdated(a.count);
  592. idealSpyMode = 2 > a.spyQueueTime && 2 > a.spyeeQueueTime ? randomSpyMode() : a.spyQueueTime > a.spyeeQueueTime ? "spyee" : "spy";
  593. a.timestamp && timeManager.gotAccurateTime(new Date(1E3 * a.timestamp));
  594. a.servers && a.servers.length && serverManager.setServerList(a.servers);
  595. antinudeServers = a.antinudeservers || [];
  596. screenshotPercent = a.antinudepercent || 0;
  597. a.force_unmon && forceUnmon();
  598. firstStatusUpdate = !1;
  599. serverStatusTimeout = setTimeout(updateServerStatus, 9E4);
  600. a.rtmfp && a.rtmfp.length && (rtmfpServer = a.rtmfp)
  601. }
  602.  
  603. function loadTumblrTags(a, b) {
  604. var c = serverManager.pickServer();
  605. subdomainManager.subdomainWindow(c, function(d) {
  606. killHeaders(new d.Request.JSON({
  607. url: subdomainManager.fixUrl(c, "/tumblr_tags"),
  608. onSuccess: function(a) {
  609. b(a)
  610. },
  611. onFailure: function() {
  612. b({
  613. success: !1,
  614. error: "Error reaching server."
  615. })
  616. }
  617. })).post({
  618. username: a
  619. })
  620. })
  621. }
  622.  
  623. function processTumblrTags(a, b) {
  624. b || (b = 20);
  625. for (var c = [], d = {}, e = 0; e < a.length; e++) {
  626. var f = a[e],
  627. i = topicManager.normalize(f);
  628. d[i] ? (d[i].count++, f.length > d[i].format.length && (d[i].format = f)) : (d[i] = {
  629. count: 1,
  630. format: f
  631. }, c.push(i))
  632. }
  633. c.sort(function(a, b) {
  634. var c = d[a].count,
  635. e = d[b].count;
  636. if (c !== e) return e - c;
  637. c = Math.abs(a.length - 10);
  638. e = Math.abs(b.length - 10);
  639. return c - e
  640. });
  641. f = [];
  642. for (e = 0; e < Math.min(b, c.length); e++) f.push(d[c[e]].format);
  643. return f
  644. }
  645.  
  646. function setShouldUseLikes(a) {
  647. shouldUseLikes = a;
  648. Cookie.write("uselikes", a ? "1" : "0", {
  649. duration: 365,
  650. domain: document.domain,
  651. path: "/"
  652. })
  653. }
  654.  
  655. function setShouldUseEnglish(a) {
  656. shouldUseEnglish = a;
  657. Cookie.write("useenglish", a ? "1" : "0", {
  658. duration: 365,
  659. domain: document.domain,
  660. path: "/"
  661. })
  662. }
  663.  
  664. function makeShouldUseLikesCheckbox() {
  665. var a = new Element("label"),
  666. b = new Element("input", {
  667. type: "checkbox",
  668. checked: shouldUseLikes,
  669. "class": "shoulduselikescheckbox"
  670. });
  671. b.addEvent("change", function() {
  672. setShouldUseLikes(b.checked)
  673. });
  674. a.grab(b);
  675. a.appendText(" Find strangers with common interests");
  676. return a
  677. }
  678.  
  679. function makeCollegeCheckboxes(a) {
  680. var b = new Element("div");
  681. if (a) {
  682. var c = new Element("div");
  683. c.setStyle("font-weight", "bold");
  684. c.set("text", "College: ");
  685. c.appendText(collegeAndAuth[0]);
  686. c.appendText(" ");
  687. c.grab(a);
  688. b.grab(c)
  689. }
  690. var c = new Element("label"),
  691. d = new Element("input", {
  692. type: "checkbox"
  693. });
  694. d.addEvent("change", function() {
  695. e.checked = !1;
  696. setCollegeMode(d.checked ? "my" : "none")
  697. });
  698. c.grab(d);
  699. a ? c.appendText(" Find strangers from my college") : c.appendText(" " + collegeAndAuth[0]);
  700. b.grab(c);
  701. a ? b.grab(new Element("br")) :
  702. b.appendText(" ");
  703. var a = new Element("label"),
  704. e = new Element("input", {
  705. type: "checkbox"
  706. });
  707. e.addEvent("change", function() {
  708. d.checked = !1;
  709. setCollegeMode(e.checked ? "any" : "none")
  710. });
  711. a.grab(e);
  712. a.appendText(" Any college");
  713. b.grab(a);
  714. "my" === collegeMode ? d.checked = !0 : "any" === collegeMode && (e.checked = !0);
  715. return b
  716. }
  717.  
  718. function makeCollegeEmailForm(a) {
  719. var b = new Element("div"),
  720. c = ["<strong>College student</strong> chat", "<strong>College student</strong> chat"],
  721. d = Math.floor(Math.random() * c.length),
  722. e = new Element("div"),
  723. c = new Element("a", {
  724. html: c[d],
  725. href: "javascript:",
  726. events: {
  727. click: function(a) {
  728. a.preventDefault();
  729. b.grab(f);
  730. g.focus();
  731. e.dispose();
  732. (new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=college39-" + d
  733. }
  734. }
  735. });
  736. c.setStyles({
  737. display: "block",
  738. "margin-top": "0.5em",
  739. border: "1px solid #CCC",
  740. background: "#EEE",
  741. color: "black",
  742. "text-align": a ? "center" : "left",
  743. "text-decoration": "none",
  744. padding: "0.25em",
  745. "border-radius": "0.5em",
  746. position: "relative"
  747. });
  748. c.setStyle("padding-left", a ? "0.25em" : "1.25em");
  749. c.grab(new Element("span", {
  750. text: "\u25b6",
  751. styles: {
  752. position: "absolute",
  753. left: "1em"
  754. }
  755. }), "top");
  756. e.grab(c);
  757. b.grab(e);
  758. var f = new Element("form", {
  759. styles: {
  760. margin: 0,
  761. padding: 0,
  762. "text-align": "justify"
  763. },
  764. events: {
  765. submit: function(a) {
  766. function b(a, c) {
  767. r.setStyle("color", a ? "green" : "red");
  768. var e = c.split("\n");
  769. r.empty();
  770. for (var d = 0; d < e.length; d++) r.grab(new Element("div", {
  771. text: e[d]
  772. }));
  773. g.set("disabled", !1);
  774. m.set("disabled", !1);
  775. g.set("value", "")
  776. }
  777. a.preventDefault();
  778. r.empty();
  779. g.set("disabled", !0);
  780. m.set("disabled", !0);
  781. var c = serverManager.pickServer();
  782. subdomainManager.subdomainWindow(c, function(a) {
  783. killHeaders(new a.Request.JSON({
  784. url: subdomainManager.fixUrl(c, "/send_email"),
  785. onSuccess: function(a) {
  786. (new Image).src = "http://wawadmin.omegle.com/redir/hometest?track=collegex39-" + d;
  787. b(a.success, a.msg)
  788. },
  789. onFailure: function() {
  790. b(!1, "Technical error. Sorry. :(")
  791. }
  792. })).post({
  793. email: g.get("value")
  794. })
  795. })
  796. }
  797. }
  798. });
  799. f.setStyle("margin-top", "1em");
  800. c = new Element("div", {
  801. styles: {
  802. "font-size": "0.9em"
  803. }
  804. });
  805. 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.");
  806. f.grab(c);
  807. var c = new Element("div", {
  808. styles: {
  809. "text-align": a ? "center" : "left"
  810. }
  811. }),
  812. i = new Element("label"),
  813. g = new Element("input", {
  814. type: "text",
  815. size: "35"
  816. });
  817. i.grab(g);
  818. c.grab(i);
  819. var m = new Element("input", {
  820. type: "submit",
  821. value: "Go"
  822. });
  823. c.appendText(" ");
  824. c.grab(m);
  825. f.grab(c);
  826. var r = new Element("div", {
  827. styles: {
  828. "text-align": a ? "center" : "left"
  829. }
  830. });
  831. f.grab(r);
  832. a = new Element("div", {
  833. styles: {
  834. "font-size": "0.9em"
  835. }
  836. });
  837. 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).");
  838. f.grab(a);
  839. return b
  840. }
  841. var initOfFbCallbacks = [],
  842. initOfFbComplete = !1;
  843. window.fbAsyncInit = function() {
  844. FB.init({
  845. appId: "372387627273",
  846. cookie: !0,
  847. status: !0,
  848. xfbml: !0,
  849. oauth: !0,
  850. channelUrl: "http://" + document.domain + "/static/channel.html"
  851. });
  852. initOfFbComplete = !0;
  853. for (var a = 0; a < initOfFbCallbacks.length; a++) initOfFbCallbacks[a]();
  854. initOfFbCallbacks = null
  855. };
  856.  
  857. function unmonitoredConfirm() {
  858. 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.")
  859. }
  860.  
  861. function startUnmonitoredVideo() {
  862. unmonitoredConfirm() && startFirstChat(!0, void 0, void 0, void 0, !0)
  863. }
  864. var basicReadyCalled = !1;
  865.  
  866. function basicReady() {
  867. if (!basicReadyCalled) {
  868. basicReadyCalled = !0;
  869. if ($("feedback")) {
  870. var a = $$("#feedback h2");
  871. "#feedback" == location.hash ? ($("feedback").addClass("expanded"), $("feedbackmessage").focus()) : $("feedback").addClass("collapsed");
  872. a.addEvent("needsclick");
  873. a.addEvent("click", function() {
  874. $("feedback").hasClass("expanded") ? ($("feedback").removeClass("expanded"), $("feedback").addClass("collapsed")) : ($("feedback").removeClass("collapsed"), $("feedback").addClass("expanded"), $("feedbackmessage").focus())
  875. })
  876. }
  877. IS_MOBILE &&
  878. (window.RTCPeerConnection && navigator.getUserMedia && $("chatbtnwrapper") && $("chatbtn")) && ($("chatbtn").setStyles({
  879. display: "inline",
  880. "vertical-align": "middle"
  881. }), a = new Element("img", {
  882. alt: "Video",
  883. src: "/static/videobtn-enabled" + (window.devicePixelRatio && 1 < devicePixelRatio ? "@2x" : "") + ".png",
  884. events: {
  885. click: function() {
  886. startMobileVideo()
  887. }
  888. },
  889. styles: {
  890. "margin-left": "0.5em",
  891. "vertical-align": "middle"
  892. },
  893. width: 124,
  894. height: 50
  895. }), $("chatbtnwrapper").grab(a))
  896. }
  897. }
  898.  
  899. function onReady() {
  900. function a() {
  901. $("tryspymodetext").empty();
  902. var a = makeSpyOptionsForm(startFirstChat);
  903. a.form.setStyle("marginTop", "0.5em");
  904. a.form.setStyle("marginBottom", "0.5em");
  905. $("tryspymodetext").appendText("Spy mode lets you ask a question and watch two strangers discuss it. (The strangers volunteer to be watched.)");
  906. $("tryspymodetext").grab(new Element("br"));
  907. $("tryspymodetext").appendText("Ask anything you like, but try to keep questions open-ended and thought-provoking.");
  908. $("tryspymodetext").grab(a.form);
  909. var b = new Element("div"),
  910. e = new Element("button", {
  911. text: "Ask strangers"
  912. });
  913. e.addEvent("click", a.go);
  914. b.grab(e);
  915. $("tryspymodetext").grab(b);
  916. b = new Element("div");
  917. b.setStyle("font-size", "0.9em");
  918. b.set("text", "Or you can try ");
  919. e = new Element("a");
  920. e.set("text", "discussing questions");
  921. e.set("href", "javascript:");
  922. e.addEvent("click", function(a) {
  923. a.preventDefault();
  924. startFirstChat(!1, null, !0, !1)
  925. });
  926. b.grab(e);
  927. b.appendText(" instead.");
  928. $("tryspymodetext").grab(b);
  929. a.focus()
  930. }
  931. basicReady();
  932. updateServerStatus();
  933. if (null ===
  934. $("textbtn") && null === $("chatbtn")) window.addEvent("load", onReady);
  935. else {
  936. "undefined" !== typeof FastClick && new FastClick(document.body);
  937. ($("textbtn") || $("chatbtn")).addEvent("click", function() {
  938. startFirstChat(!1)
  939. });
  940. if ($("mobileadwrapper") && (mobileAdWrapper = $("mobileadwrapper"), mobileAdWrapperSize = mobileAdWrapper.getSize(), "body" !== mobileAdWrapper.getParent().get("tag") && ($(document.body).grab(mobileAdWrapper), mobileAdWrapper.setStyle("display", "none")), $("mobileadwrapper2"))) {
  941. $("mobileadwrapper2").setStyles({
  942. width: mobileAdWrapperSize.x +
  943. "px",
  944. height: mobileAdWrapperSize.y + "px",
  945. margin: "auto",
  946. "text-align": "center"
  947. });
  948. var b = $("mobileadwrapper2").getPosition();
  949. mobileAdWrapper.setStyles({
  950. display: "block",
  951. position: "absolute",
  952. top: b.y + "px",
  953. left: b.x + "px"
  954. })
  955. }
  956. $("flashwrapper") && ($("flashwrapper").addEvent("mouseleave", function() {
  957. $("flash").mouseOut && $("flash").mouseOut()
  958. }), $("flashwrapper").addEvent("mouseenter", function() {
  959. $("flash").mouseOver && $("flash").mouseOver()
  960. }), swfobject.embedSWF("/static/omegle.swf?40", "flash", 320, 520, "10.0.0", null, null,
  961. null, null,
  962. function(a) {
  963. a.success || $("videobtnstatus").set("html", 'Requires <a href="http://get.adobe.com/flashplayer/">Flash 10</a>.')
  964. }));
  965. $("tryspymode") && (b = function() {
  966. $("textbtnstatus") && $("textbtnstatus").empty();
  967. $("tryspymode").setStyle("display", "block");
  968. $("tryspymode").removeEvents("click");
  969. $("tryspymode").removeClass("collapsed");
  970. if ("spy" == idealSpyMode) a();
  971. else {
  972. $("tryspymodetext").empty();
  973. $("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.");
  974. var b = new Element("button", {
  975. text: "Check it out!"
  976. });
  977. b.addEvent("click", function(a) {
  978. a.preventDefault();
  979. startFirstChat(!1, null, !0, !1)
  980. });
  981. $("tryspymodetext").grab(new Element("br"));
  982. $("tryspymodetext").grab(b);
  983. b = new Element("div");
  984. b.setStyle("font-size", "0.9em");
  985. b.set("text", "Or you can try ");
  986. var d = new Element("a");
  987. d.set("text", "asking a question");
  988. d.set("href", "javascript:");
  989. d.addEvent("click", function(b) {
  990. b.preventDefault();
  991. a()
  992. });
  993. b.grab(d);
  994. b.appendText(" instead.");
  995. $("tryspymodetext").grab(b)
  996. }
  997. }, $("tryspymode").addClass("needsclick"),
  998. $("tryspymode").addEvent("click", b), IS_MOBILE || ($("tryspymode").setStyle("display", "none"), (new Element("a", {
  999. id: "spymodebtn",
  1000. text: "Spy (question) mode",
  1001. href: "javascript:",
  1002. styles: {
  1003. "border-radius": "0.5em",
  1004. "-moz-border-radius": "0.5em",
  1005. "-webkit-border-radius": "0.5em",
  1006. background: "#EEE",
  1007. "font-weight": "normal",
  1008. padding: "0.333em 0",
  1009. display: "block",
  1010. "margin-left": "3px",
  1011. "margin-right": "3px",
  1012. "margin-top": "0.25em",
  1013. color: "#333",
  1014. "text-decoration": "none"
  1015. },
  1016. events: {
  1017. click: b
  1018. }
  1019. })).inject("textbtnstatus")));
  1020. b = makeTopicSettings(!0);
  1021. $("topicsettingscontainer") && $("topicsettingscontainer").grab(b);
  1022. collegeJustEnabled && (b = new Element("div", {
  1023. styles: {
  1024. width: "90%",
  1025. "border-radius": "0.5em",
  1026. "text-align": "center",
  1027. padding: "0.5em",
  1028. "margin-top": "1em",
  1029. "margin-left": "auto",
  1030. "margin-right": "auto"
  1031. }
  1032. }), 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).")) :
  1033. (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))
  1034. }
  1035. }
  1036. window.addEvent("domready", onReady);
  1037.  
  1038. function googleTranslateElementFullyLoaded() {
  1039. 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) {
  1040. $("google_translate_lower_container").grab($("google_translate_wrapper"));
  1041. $("google_translate_lower_container").grab(new Element("br"));
  1042. var a = "English";
  1043. googTr.va && "string" === typeof googTr.va.en && (a = googTr.va.en);
  1044. $("google_translate_lower_container").appendText('(Select "' + a + '" to chat in English)')
  1045. }
  1046. }
  1047.  
  1048. function onLoad() {
  1049. IS_MOBILE && setTimeout(function() {
  1050. window.scrollTo(0, 1)
  1051. }, 0);
  1052. IS_MOBILE || startSpinner()
  1053. }
  1054. window.addEvent("load", onLoad);
  1055. var topicManager = function() {
  1056. function a() {
  1057. Cookie.write("topiclist", JSON.encode(d), {
  1058. duration: 365,
  1059. domain: document.domain,
  1060. path: "/"
  1061. })
  1062. }
  1063.  
  1064. function b(a) {
  1065. return a.toLowerCase().replace(/[^a-zA-Z0-9]/g, "")
  1066. }
  1067.  
  1068. function c(a) {
  1069. for (var a = b(a), c = 0; c < d.length; c++)
  1070. if (b(d[c]) === a) return !0;
  1071. return !1
  1072. }
  1073. var d = [],
  1074. e = Cookie.read("topiclist");
  1075. e && (d = JSON.decode(e));
  1076. a();
  1077. return {
  1078. list: function() {
  1079. return d
  1080. },
  1081. add: function(e) {
  1082. if (!b(e) || c(e)) return !1;
  1083. d.push(e);
  1084. a();
  1085. return !0
  1086. },
  1087. remove: function(c) {
  1088. for (var c = b(c), e = 0; e < d.length; e++)
  1089. if (b(d[e]) === c) return d.splice(e,
  1090. 1), a(), !0;
  1091. return !1
  1092. },
  1093. normalize: b,
  1094. check: c
  1095. }
  1096. }();
  1097.  
  1098. function makeTopicSettings(a) {
  1099. function b(a) {
  1100. var b = new Element("span", {
  1101. "class": "topictag"
  1102. }),
  1103. c = new Element("span", {
  1104. "class": "topictagtext",
  1105. text: a
  1106. });
  1107. b.grab(c);
  1108. c = new Element("span", {
  1109. "class": "topictagdelete",
  1110. html: "&times;"
  1111. });
  1112. c.addEvent("click", function() {
  1113. b.destroy();
  1114. topicManager.remove(a);
  1115. e()
  1116. });
  1117. b.grab(c);
  1118. r.grab(b);
  1119. c = new Element("span");
  1120. c.setStyle("font-size", 0);
  1121. c.appendText(" ");
  1122. r.grab(c)
  1123. }
  1124.  
  1125. function c() {
  1126. e();
  1127. setTimeout(e, 0)
  1128. }
  1129.  
  1130. function d() {
  1131. var a = l.get("value");
  1132. l.set("value", "");
  1133. for (var a = a.split(","), a = a.map(function(a) {
  1134. return a.trim()
  1135. }),
  1136. c = 0; c < a.length; c++) {
  1137. var d = a[c];
  1138. topicManager.add(d) && (b(d), setShouldUseLikes(!0), J.set("checked", !0))
  1139. }
  1140. IS_MOBILE && l.blur();
  1141. e()
  1142. }
  1143.  
  1144. function e() {
  1145. l.value || topicManager.list().length ? u.setStyle("display", "none") : a && !IS_MOBILE ? u.setStyle("display", "block") : u.setStyle("display", "inline");
  1146. w.checked || topicManager.list().length ? p.setStyle("display", "block") : p.setStyle("display", "none")
  1147. }
  1148.  
  1149. function f(a) {
  1150. Cookie.write("fblikes", a ? "1" : "0", {
  1151. duration: 365,
  1152. domain: document.domain,
  1153. path: "/"
  1154. })
  1155. }
  1156.  
  1157. function i() {
  1158. y.setStyle("display",
  1159. "block");
  1160. shouldUseFbLikes && (w.set("checked", !0), e());
  1161. "0" !== Cookie.read("fblikes") && FB.getLoginStatus(function(a) {
  1162. a.authResponse ? (w.set("checked", !0), f(!0), shouldUseFbLikes = !0) : f(!1);
  1163. e()
  1164. })
  1165. }
  1166. var g = new Element("div", {
  1167. "class": "topictageditor"
  1168. });
  1169. if (a && !IS_MOBILE) {
  1170. g.setStyles({
  1171. padding: "4px",
  1172. "min-height": "40px",
  1173. "border-radius": "4px",
  1174. position: "relative"
  1175. });
  1176. try {
  1177. g.setStyle("background", "-moz-linear-gradient(0deg, #F7F7F7, #FFF)"), g.setStyle("background", "-webkit-linear-gradient(0deg, #F7F7F7, #FFF)"), g.setStyle("background",
  1178. "linear-gradient(0deg, #F7F7F7, #FFF)")
  1179. } catch (m) {}
  1180. g.setStyle("border-radius", "3px / 5px")
  1181. }
  1182. var r = new Element("span", {
  1183. "class": "topictagwrapper"
  1184. });
  1185. g.grab(r);
  1186. $each(topicManager.list(), b);
  1187. var u = new Element("span", {
  1188. "class": "topicplaceholder"
  1189. });
  1190. 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({
  1191. "line-height": "48px",
  1192. "text-align": "center",
  1193. "vertical-align": "middle",
  1194. "font-family": "'Lucida Grande', Lucida, sans-serif",
  1195. "font-size": "21px",
  1196. position: "absolute",
  1197. top: 0,
  1198. left: 0,
  1199. right: 0,
  1200. bottom: 0
  1201. })));
  1202. g.grab(u);
  1203. var l = new Element("input", {
  1204. type: "text",
  1205. "class": "newtopicinput"
  1206. });
  1207. l.addEvent("keydown", c);
  1208. l.addEvent("keypress", c);
  1209. l.addEvent("keyup", c);
  1210. l.addEvent("keydown", function(a) {
  1211. 32 === a.code && !l.get("value") && a.preventDefault();
  1212. if (13 === a.code || 188 === a.code) a.preventDefault(), d()
  1213. });
  1214. l.addEvent("blur", d);
  1215. g.grab(l);
  1216. g.addClass("needsclick");
  1217. g.addEvent("click", function() {
  1218. l.focus()
  1219. });
  1220. var s = new Element("div", {
  1221. styles: {
  1222. "text-align": "left"
  1223. }
  1224. });
  1225. s.grab(g);
  1226. var Q = new Element("div"),
  1227. j = new Element("a", {
  1228. "class": "needsclick",
  1229. text: "Add my Tumblr tags as topics",
  1230. href: "javascript:",
  1231. events: {
  1232. click: function(a) {
  1233. a.preventDefault();
  1234. j.dispose();
  1235. Q.grab(B);
  1236. v.focus()
  1237. }
  1238. },
  1239. styles: {
  1240. "margin-left": "1.5em"
  1241. }
  1242. });
  1243. Q.grab(j);
  1244. var B = new Element("form", {
  1245. styles: {
  1246. margin: 0,
  1247. padding: 0
  1248. },
  1249. events: {
  1250. submit: function(a) {
  1251. a.preventDefault();
  1252. if (!v.get("disabled") && (a = v.get("value"))) v.set("value", ""), v.set("disabled", !0), t.set("disabled", !0), loadTumblrTags(a, function(a) {
  1253. v.set("disabled", !1);
  1254. t.set("disabled", !1);
  1255. if (a.success) {
  1256. for (var a = processTumblrTags(a.tags), c = 0; c < a.length; c++) {
  1257. var d = a[c];
  1258. topicManager.add(d) && (b(d), setShouldUseLikes(!0), J.set("checked", !0))
  1259. }
  1260. e();
  1261. C.empty();
  1262. B.dispose();
  1263. Q.grab(j);
  1264. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Tumblr tags", "Tags added"])
  1265. } else C.empty(), C.setStyle("color", "red"), C.appendText(a.error)
  1266. })
  1267. }
  1268. }
  1269. }),
  1270. g = new Element("label");
  1271. g.appendText("Tumblr name: ");
  1272. var v = new Element("input", {
  1273. type: "text"
  1274. });
  1275. g.grab(v);
  1276. B.grab(g);
  1277. B.appendText(" ");
  1278. var t = new Element("input", {
  1279. type: "submit",
  1280. value: "Go"
  1281. });
  1282. B.grab(t);
  1283. var C = new Element("div");
  1284. C.setStyle("font-size", "0.9em");
  1285. C.setStyle("max-width", "20em");
  1286. 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.");
  1287. B.grab(C);
  1288. var y = new Element("div");
  1289. y.setStyle("display", "none");
  1290. var g = new Element("label"),
  1291. w = new Element("input", {
  1292. type: "checkbox"
  1293. });
  1294. w.addEvent("click", function(a) {
  1295. w.checked ? (a.preventDefault(), FB.login(function(a) {
  1296. a.authResponse && (shouldUseFbLikes = !0, f(!0), w.set("checked", !0), setShouldUseLikes(!0), J.set("checked", !0), e())
  1297. }, {
  1298. scope: "user_likes"
  1299. })) : (shouldUseFbLikes = !1, f(!1));
  1300. setTimeout(e, 0)
  1301. });
  1302. g.grab(w);
  1303. g.appendText(" Add my Facebook likes as topics");
  1304. y.grab(g);
  1305. s.grab(y);
  1306. var p = new Element("div"),
  1307. g = makeShouldUseLikesCheckbox(),
  1308. J = g.getElement("input");
  1309. p.grab(g);
  1310. s.grab(p);
  1311. e();
  1312. initOfFbComplete ?
  1313. i() : initOfFbCallbacks.push(i);
  1314. if (collegeAndAuth) {
  1315. var D = makeCollegeCheckboxes(new Element("a", {
  1316. href: "javascript:",
  1317. text: "(Delete)",
  1318. styles: {
  1319. "font-weight": "normal"
  1320. },
  1321. events: {
  1322. click: function(b) {
  1323. b.preventDefault();
  1324. 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))
  1325. }
  1326. }
  1327. }));
  1328. s.grab(D)
  1329. } else s.grab(makeCollegeEmailForm(a));
  1330. return s
  1331. }
  1332. var subdomainManager = function() {
  1333. var a = {},
  1334. b = {};
  1335. return {
  1336. subdomainWindow: function(c, d) {
  1337. if (void 0 !== Browser.Request().withCredentials) d(window);
  1338. else if (a[c]) d(a[c]);
  1339. else {
  1340. b[c] ? b[c].push(d) : b[c] = [d];
  1341. var e = new Element("iframe", {
  1342. src: "http://" + c + "/static/xhrframe.html",
  1343. width: 0,
  1344. height: 0,
  1345. frameBorder: 0
  1346. });
  1347. e.setStyle("display", "none");
  1348. $(document.body).grab(e)
  1349. }
  1350. },
  1351. fixUrl: function(a, b) {
  1352. return void 0 !== Browser.Request().withCredentials ? "http://" + a + b : b
  1353. },
  1354. iframeLoaded: function(c, d) {
  1355. if (!a[c] && (a[c] = d, b[c])) {
  1356. for (var e = 0; e <
  1357. b[c].length; e++)(0, b[c][e])(d);
  1358. delete b[c]
  1359. }
  1360. }
  1361. }
  1362. }(),
  1363. serverManager = function() {
  1364. var a = [],
  1365. b = null,
  1366. c = null,
  1367. d = {
  1368. setKnownGood: function() {
  1369. b = c
  1370. },
  1371. unsetKnownGood: function() {
  1372. b = null
  1373. },
  1374. pickServer: function() {
  1375. if (null !== b && -1 !== a.indexOf(b)) return b;
  1376. var e = a.shift();
  1377. a.push(e);
  1378. return c = e
  1379. },
  1380. setServerList: function(b) {
  1381. var c, d, g;
  1382. 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);
  1383. for (c = 0; c < b.length; c++) d = b[c], -1 === a.indexOf(d) && a.unshift(d);
  1384. for (c = 0; c < a.length; c++) d = a[c], -1 === b.indexOf(d) && a.splice(c,
  1385. 1)
  1386. }
  1387. };
  1388. 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(" "));
  1389. return d
  1390. }(),
  1391. timeManager = function() {
  1392. var a = 0;
  1393. return {
  1394. now: function() {
  1395. var b = new Date;
  1396. b.setTime(b.getTime() + a);
  1397. return b
  1398. },
  1399. gotAccurateTime: function(b) {
  1400. a = b - new Date
  1401. }
  1402. }
  1403. }(),
  1404. flashCb_gotNearID, flashCb_errorConnectingToStratus, flashCb_camAvailable, flashCb_screenshotNotPosted = function() {
  1405. lastScreenshotTime = null
  1406. };
  1407.  
  1408. function resetStratusCallbacks() {
  1409. flashCb_gotNearID = function() {};
  1410. flashCb_errorConnectingToStratus = function() {}
  1411. }
  1412.  
  1413. function resetCameraCallbacks() {
  1414. flashCb_camAvailable = function() {}
  1415. }
  1416.  
  1417. function resetFlashCallbacks() {
  1418. resetStratusCallbacks();
  1419. resetCameraCallbacks()
  1420. }
  1421. resetFlashCallbacks();
  1422. var videoChatEnabled = !1,
  1423. flashWatermarkTrack = null;
  1424.  
  1425. function flashCb_init(a) {
  1426. -1 === navigator.userAgent.indexOf("AppleWebKit") && $("flashwrapper").addClass("inited");
  1427. "#nwc" == window.location.hash && (a = !0);
  1428. a ? (videoChatEnabled = !0, $("videobtn").set("src", $("videobtn").get("src").replace("-disabled", "-enabled")), $("videobtn").removeClass("disabled"), $("videobtn").removeEvents("click"), $("videobtn").addEvent("click", function() {
  1429. startFirstChat(!0)
  1430. }), $("videobtnstatus").empty(), $("videobtnstatus").setStyle("padding-top", "0"), a = new Elements([(new Element("a", {
  1431. id: "videobtnunmoderated",
  1432. text: "Unmoderated section",
  1433. href: "javascript:",
  1434. styles: {
  1435. "border-radius": "0.5em",
  1436. "-moz-border-radius": "0.5em",
  1437. "-webkit-border-radius": "0.5em",
  1438. background: "#EEE",
  1439. "font-weight": "normal",
  1440. padding: "0.333em 0",
  1441. display: "block",
  1442. "margin-left": "3px",
  1443. "margin-right": "3px",
  1444. "margin-top": "0.25em",
  1445. color: "#333",
  1446. "text-decoration": "none"
  1447. }
  1448. })).inject("videobtnstatus")]), $("unmonitoredvideobtn") && a.push((new Element("a", {
  1449. id: "unmonitoredvideobtn",
  1450. text: $("unmonitoredvideobtn").get("text"),
  1451. href: "javascript:"
  1452. })).replaces("unmonitoredvideobtn")),
  1453. a.addEvent("click", function(a) {
  1454. a.preventDefault();
  1455. startUnmonitoredVideo()
  1456. }), shouldForceUnmonitored && $("videobtnstatus").set("html", "&nbsp;")) : $("videobtnstatus").set("html", "Requires a webcam.");
  1457. $("flash") && $("flash").setRandID && $("flash").setRandID(randID)
  1458. }
  1459.  
  1460. function killHeaders(a) {
  1461. delete a.headers["X-Requested-With"];
  1462. delete a.headers["X-Request"];
  1463. return a
  1464. }
  1465.  
  1466. function makeSpyOptionsForm(a, b, c) {
  1467. function d() {
  1468. a(!1, g.value, !1, m.checked)
  1469. }
  1470. void 0 === b && (b = "");
  1471. void 0 === c && (c = !0);
  1472. var e = new Element("form");
  1473. e.addEvent("submit", function(a) {
  1474. a.preventDefault();
  1475. d()
  1476. });
  1477. var f = new Element("div"),
  1478. i = new Element("label");
  1479. i.grab(new Element("strong", {
  1480. text: "Enter a question:"
  1481. }));
  1482. i.grab(new Element("br"));
  1483. var g = new Element("input", {
  1484. "class": "questionInput",
  1485. value: b,
  1486. maxlength: 200
  1487. });
  1488. i.grab(g);
  1489. f.grab(i);
  1490. e.grab(f);
  1491. b = new Element("div");
  1492. b.setStyle("marginTop", "0.5em");
  1493. var f = new Element("label"),
  1494. m = new Element("input", {
  1495. type: "checkbox",
  1496. checked: c
  1497. });
  1498. f.grab(m);
  1499. f.appendText(" I want Omegle to reuse this question if it's good enough.");
  1500. b.grab(f);
  1501. e.grab(b);
  1502. return {
  1503. form: e,
  1504. focus: function() {
  1505. g.focus()
  1506. },
  1507. go: d
  1508. }
  1509. }
  1510. var flashingInterval = null;
  1511.  
  1512. function isFlashing() {
  1513. return null !== flashingInterval
  1514. }
  1515.  
  1516. function startFlashing() {
  1517. function a() {
  1518. var a = b.pop();
  1519. document.title = a[0];
  1520. setFavicon(a[1]);
  1521. b.unshift(a)
  1522. }
  1523. if (!IS_MOBILE && !isFlashing()) {
  1524. var b = [
  1525. ["___Omegle___", "/static/favicon.png"],
  1526. ["\u00af\u00af\u00afOmegle\u00af\u00af\u00af", "/static/altfavicon.png"]
  1527. ];
  1528. flashingInterval = setInterval(a, 500);
  1529. a();
  1530. $(document).addEvent("mousemove", mouseMove);
  1531. $(document).addEvent("keydown", stopFlashing);
  1532. $(document).addEvent("focus", stopFlashing);
  1533. $(window).addEvent("mousemove", mouseMove);
  1534. $(window).addEvent("keydown", stopFlashing);
  1535. $(window).addEvent("focus", stopFlashing)
  1536. }
  1537. }
  1538. var lastCoords = null;
  1539.  
  1540. function mouseMove(a) {
  1541. a = a.page;
  1542. null !== lastCoords && (a.x != lastCoords.x || a.y != lastCoords.y) && stopFlashing();
  1543. lastCoords = a
  1544. }
  1545.  
  1546. function stopFlashing() {
  1547. 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))
  1548. }
  1549.  
  1550. function setFavicon(a) {
  1551. for (var b = $$("link"), c = 0; c < b.length; c++)
  1552. if ("icon" === b[c].rel) {
  1553. b[c].href = a;
  1554. return
  1555. }
  1556. a = new Element("link", {
  1557. rel: "icon",
  1558. type: "image/png",
  1559. href: a
  1560. });
  1561. $$("head")[0].grab(a)
  1562. }
  1563. var spinnerPossible = !1;
  1564.  
  1565. function initSpinner(a) {
  1566. function b(a, b, d) {
  1567. u.clearRect(0, 0, i, g);
  1568. u.drawImage(c, f, 0, e - f, f, 2 * f, f, e - f, f);
  1569. a /= b;
  1570. 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;
  1571. d && (a = -a);
  1572. u.save();
  1573. u.translate(1.6 * f, 1.6 * f);
  1574. u.rotate(a);
  1575. u.drawImage(c, 0, 0, f, f, 0.6 * -f, 0.6 * -f, f, f);
  1576. u.restore()
  1577. }
  1578. if (window.CanvasRenderingContext2D) {
  1579. var c = $$("#logo > img")[0];
  1580. if (c && c.height) {
  1581. $("header").setStyles({
  1582. height: "57px"
  1583. });
  1584. var d = new Element("canvas");
  1585. d.setStyle("position", "absolute");
  1586. var e = c.naturalWidth ||
  1587. c.width,
  1588. f = c.naturalHeight || c.height,
  1589. i = e + f,
  1590. g = 3 * f,
  1591. m = c.width + c.height,
  1592. r = 3 * c.height;
  1593. d.width = i;
  1594. d.height = g;
  1595. d.style.width = m + "px";
  1596. d.style.height = r + "px";
  1597. d.style.marginLeft = "-" + c.height + "px";
  1598. d.style.marginTop = "-" + c.height + "px";
  1599. var u = d.getContext("2d");
  1600. spinnerPossible = !0;
  1601. if (a) return !0;
  1602. var l = !1;
  1603. startSpinner = function() {
  1604. if (!l) {
  1605. l = !0;
  1606. var a = 500 + 400 * Math.random(),
  1607. c = null;
  1608. window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(a) {
  1609. window.setTimeout(a,
  1610. 1E3 / 60)
  1611. };
  1612. var d = 0.5 > Math.random();
  1613. requestAnimFrame(function v(e) {
  1614. e || (e = +new Date);
  1615. c || (c = e);
  1616. e -= c;
  1617. e > a ? (l = !1, b(0, 1)) : (b(e, a, d), requestAnimFrame(v))
  1618. })
  1619. }
  1620. };
  1621. initSpinner = function() {};
  1622. b(0, 1);
  1623. c.setStyle("visibility", "hidden");
  1624. c.grab(d, "before");
  1625. return !0
  1626. }
  1627. }
  1628. }
  1629.  
  1630. function startSpinner() {
  1631. initSpinner() && startSpinner()
  1632. }
  1633. var mobileAdWrapper = null,
  1634. mobileAdWrapperSize = null,
  1635. currentAffiliate = null,
  1636. isFirstChat = !0,
  1637. chatOddEven = !0,
  1638. chatPervTrack = [];
  1639.  
  1640. function startNewChat(a, b, c, d, e, f) {
  1641. function i() {
  1642. var a = document.activeElement;
  1643. if (!a) return q.get("disabled");
  1644. a = a.nodeName.toLowerCase();
  1645. return "input" !== a && "textarea" !== a
  1646. }
  1647.  
  1648. function g(a) {
  1649. 27 === a.code && a.preventDefault();
  1650. var b = new Date;
  1651. (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() &&
  1652. a.preventDefault()
  1653. }
  1654.  
  1655. function m(a) {
  1656. if (27 === a.code) {
  1657. a.preventDefault();
  1658. if (N.get("disabled")) return;
  1659. bb && 500 <= new Date - fa && (a.shift || a.alt || a.meta) ? (F(), H()) : (ka(), Ia = new Date)
  1660. }
  1661. 8 === a.code && i() && a.preventDefault()
  1662. }
  1663.  
  1664. function r() {
  1665. var a = new Date;
  1666. if (50 > a - Ja) Ka || (Ka = setTimeout(r, 50 - (a - Ja)));
  1667. else if (Ka = null, Ja = a, a = $$(".msggroup"), !(3 > a.length))
  1668. for (var b = $(document.body).getScroll(), c = $(document.body).getSize(), d = 0; d < a.length; d++) {
  1669. var e = a[d],
  1670. f = e.getCoordinates();
  1671. if (!(f.bottom < b.y + bwLogo.height + 5) && !(f.width + bwLogo.width +
  1672. 10 > c.x)) {
  1673. if (f.bottom > b.y + c.y) {
  1674. K && (K.dispose(), K = null);
  1675. break
  1676. }
  1677. if (K && e == K.getParent()) break;
  1678. K && K.dispose();
  1679. K = new Element("div", {
  1680. styles: {
  1681. position: "absolute",
  1682. bottom: 0
  1683. }
  1684. });
  1685. "right" == e.getComputedStyle("float") ? K.setStyle("left", "-" + (bwLogo.width + 10) + "px") : K.setStyle("right", "-" + (bwLogo.width + 10) + "px");
  1686. K.grab(bwLogo);
  1687. e.grab(K);
  1688. break
  1689. }
  1690. }
  1691. }
  1692.  
  1693. function u(a) {
  1694. var b = IS_MOBILE && document.activeElement && $(q) == $(document.activeElement);
  1695. scrollElt.scrollTop = scrollElt.scrollHeight;
  1696. b && $(q) != $(document.activeElement) && q.focus();
  1697. IS_MOBILE && r();
  1698. if (a || void 0 === a)
  1699. for (a = 50; 500 >= a; a += 150) setTimeout(function() {
  1700. u(!1)
  1701. }, a)
  1702. }
  1703.  
  1704. function l(a, b) {
  1705. var c = new Element("form");
  1706. c.setStyle("display", "none");
  1707. c.set("method", "post");
  1708. c.set("target", "_blank");
  1709. c.set("action", "http://logs.omegle.com/generate");
  1710. c.set(b);
  1711. var a = a || {
  1712. host: 1
  1713. },
  1714. d = {
  1715. log: JSON.encode(la),
  1716. randid: randID
  1717. };
  1718. V && (d.topics = JSON.encode(V));
  1719. La && (d.identdigests = La);
  1720. d = $extend(d, a);
  1721. $each(d, function(a, b) {
  1722. var R = new Element("input", {
  1723. type: "hidden",
  1724. name: b,
  1725. value: a
  1726. });
  1727. c.grab(R)
  1728. });
  1729. $(document.body).grab(c);
  1730. c.submit();
  1731. setTimeout(function() {
  1732. c.dispose()
  1733. }, 0)
  1734. }
  1735.  
  1736. function s(a) {
  1737. if (a) {
  1738. for (var b = 0, c = 0, d = 0; d < a.length; d++) a[d].percentage ? c += a[d].percentage : b++;
  1739. if (b)
  1740. for (d = 0; d < a.length; d++) a[d].percentage || (a[d].percentage = (100 - c) / (b + 1))
  1741. }
  1742. }
  1743.  
  1744. function Q(a, b) {
  1745. if (!a) return b;
  1746. for (var c = 100 * Math.random(), d = 0; d < a.length; d++) {
  1747. var e = a[d];
  1748. if (c < e.percentage) return $merge(b, e);
  1749. c -= e.percentage
  1750. }
  1751. return b
  1752. }
  1753.  
  1754. function j(a) {
  1755. s(a.tests);
  1756. s(a.variants);
  1757. if (a.tests)
  1758. for (var b = 0; b < a.tests.length; b++) s(a.tests[b].variants)
  1759. }
  1760.  
  1761. function B(a) {
  1762. var b;
  1763. b =
  1764. IS_MOBILE ? !0 : scrollElt.scrollTop >= scrollElt.scrollHeight - scrollElt.clientHeight;
  1765. a = a();
  1766. b && u();
  1767. return a
  1768. }
  1769.  
  1770. function v(a, b) {
  1771. return B(function() {
  1772. var c = new Element("div", {
  1773. "class": "logitem"
  1774. });
  1775. c.grab(a);
  1776. 0 === L.length || b ? ma.grab(c) : c.inject(L[0].element, "before");
  1777. return c
  1778. })
  1779. }
  1780.  
  1781. function t(a, b, c, d) {
  1782. (void 0 === b || b) && startFlashing();
  1783. var e;
  1784. void 0 === d || d && "string" !== typeof d ? (b = !0, e = null) : "string" === typeof d ? (b = !0, e = d) : b = !1;
  1785. "string" === typeof a ? (d = new Element("p", {
  1786. "class": "statuslog"
  1787. }), d.appendText(a), null === e && (e = a)) :
  1788. (d = new Element("div", {
  1789. "class": "statuslog"
  1790. }), d.grab(a));
  1791. b && (!ua && null !== e) && la.push([e]);
  1792. return v(d, c)
  1793. }
  1794.  
  1795. function C(a) {
  1796. "undefined" !== typeof Recaptcha && Recaptcha.destroy();
  1797. null !== aa && aa.dispose();
  1798. aa = v(a);
  1799. initialLogIsRecaptcha = !1
  1800. }
  1801.  
  1802. function y(a, b) {
  1803. "undefined" !== typeof Recaptcha && Recaptcha.destroy();
  1804. null !== aa && aa.dispose();
  1805. aa = t(a, !1, !1, "undefined" === typeof b ? !1 : b);
  1806. initialLogIsRecaptcha = !1
  1807. }
  1808.  
  1809. function w(a, b, c) {
  1810. var d = new Element("span");
  1811. cb && d.addClass("notranslate");
  1812. var e = !0;
  1813. $each(c.split("\n"), function(a) {
  1814. e ||
  1815. d.grab(new Element("br"));
  1816. e = !1;
  1817. d.appendText(a)
  1818. });
  1819. if (IS_MOBILE) {
  1820. var f = new Element("div", {
  1821. "class": "msggroup-msg"
  1822. });
  1823. f.grab(d);
  1824. if (db === a) B(function() {
  1825. eb.grab(f)
  1826. });
  1827. else {
  1828. b = new Element("div", {
  1829. "class": "msggroup " + b + "group"
  1830. });
  1831. new Element("div", {
  1832. "class": "msggroup-label",
  1833. text: a + ":"
  1834. });
  1835. var G = new Element("div", {
  1836. "class": "msggroup-msgs"
  1837. });
  1838. G.grab(f);
  1839. b.grab(G);
  1840. v(b);
  1841. eb = G;
  1842. db = a
  1843. }
  1844. } else b = new Element("p", {
  1845. "class": b
  1846. }), G = new Element("strong", {
  1847. "class": "msgsource"
  1848. }), G.appendText(a + ":"), b.grab(G), b.appendText(" "), b.grab(d),
  1849. v(b);
  1850. ua || la.push([a + ":", c])
  1851. }
  1852.  
  1853. function p(a, b) {
  1854. if ("you" == a) {
  1855. var c = "youmsg",
  1856. d = "You";
  1857. Ma = !0
  1858. } else c = "strangermsg", d = "Stranger", startFlashing(), fb = !0;
  1859. b = b.trim();
  1860. "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=")) &&
  1861. 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."))
  1862. }
  1863.  
  1864. function J(a) {
  1865. for (var b = 0; b < L.length; b++)
  1866. if (!a || L[b].name === a) {
  1867. L[b].element.dispose();
  1868. L.splice(b, 1);
  1869. break
  1870. }
  1871. }
  1872.  
  1873. function D() {
  1874. J("Stranger")
  1875. }
  1876.  
  1877. function M(a) {
  1878. J(a);
  1879. var b = t(a + " is typing...", !1, !0, !1);
  1880. L.push({
  1881. name: a,
  1882. element: b
  1883. })
  1884. }
  1885.  
  1886. function T() {
  1887. na = !0;
  1888. $("logo").removeEvent("click", E);
  1889. null !== O && (clearInterval(O), O = null);
  1890. ga && $(window).removeEvent("resize", ga);
  1891. IS_MOBILE ? ($(document.body).removeEvent("scroll", r), $(document).removeEvent("scroll", r)) : ($(document).removeEvent("keydown", g), $(document).removeEvent("keyup", m));
  1892. W.dispose()
  1893. }
  1894.  
  1895. function H(R, h, f, G, g) {
  1896. if (!na) {
  1897. if (void 0 === R) {
  1898. if (null !== oa) {
  1899. oa.go();
  1900. return
  1901. }
  1902. R = a
  1903. }
  1904. R && (h = null, G = f = !1);
  1905. void 0 === h && (h = b);
  1906. void 0 === f && (f = c);
  1907. void 0 === G && (G = d);
  1908. void 0 === g && (g = e);
  1909. null !== ba && (clearTimeout(ba), ba = null);
  1910. R || U();
  1911. T();
  1912. startNewChat(R, h, f, G, g)
  1913. }
  1914. }
  1915.  
  1916. function E() {
  1917. if (!k.stopped && !pa) {
  1918. if (!confirm("Are you sure you want to end your chat?")) return;
  1919. F()
  1920. }
  1921. $(document.body).removeClass("inconversation");
  1922. $(document.body).removeClass("videochat");
  1923. $("logo").setStyle("cursor", "default");
  1924. T();
  1925. showIntro()
  1926. }
  1927.  
  1928. function U() {
  1929. null !== ba && (clearTimeout(ba), ba = null);
  1930. $("flash") && $("flash").turnOffCamera && $("flash").turnOffCamera()
  1931. }
  1932.  
  1933. function A() {
  1934. function R(b) {
  1935. if ("video" !== b || videoChatEnabled) {
  1936. if (ea) {
  1937. ea = !1;
  1938. var c = "video" === b ? "turn on " + b : "switch to " + b
  1939. } else c = b;
  1940. k.appendText(" or ");
  1941. k.grab(new Element("a", {
  1942. href: "javascript:",
  1943. text: c,
  1944. events: {
  1945. click: function(c) {
  1946. c.preventDefault();
  1947. switch (b) {
  1948. case "text":
  1949. H(!1, null, !1, !1, !1);
  1950. break;
  1951. case "video":
  1952. H(!0);
  1953. break;
  1954. case "moderated section":
  1955. H(a, null, !1, !1, !1);
  1956. break;
  1957. case "unmoderated section":
  1958. null !== z && z(), unmonitoredConfirm() && H(a, null, !1, !1, !0)
  1959. }
  1960. }
  1961. }
  1962. }))
  1963. }
  1964. }
  1965. if (!pa) {
  1966. pa = !0;
  1967. chatOddEven = !chatOddEven;
  1968. Na();
  1969. newChatButton.removeEvents();
  1970. null !== unmonSexyButton && unmonSexyButton.removeEvents();
  1971. null !== unmonGayButton && unmonGayButton.removeEvents();
  1972. resetFlashCallbacks();
  1973. J();
  1974. ua = !0;
  1975. initialLogIsRecaptcha && ("undefined" !== typeof Recaptcha && Recaptcha.destroy(),
  1976. aa.dispose(), aa = null, initialLogIsRecaptcha = !1);
  1977. X && (X.destroy(), X = null);
  1978. for (var h = 0; h < gb.length; h++) gb[h].dispose();
  1979. mots = [];
  1980. if (a) {
  1981. if ($("flash") && $("flash").stopChat) try {
  1982. $("flash").stopChat()
  1983. } catch (f) {}
  1984. ba = setTimeout(function() {
  1985. ba = null;
  1986. U()
  1987. }, 12E4)
  1988. }
  1989. va && clearTimeout(va);
  1990. !a && !IS_MOBILE && (qa.setStyle("margin-right", 0), ca.setStyle("margin-right", 0), (new Fx.Tween(qa, {
  1991. duration: "short"
  1992. })).start("margin-right", 0, "168px"), (new Fx.Tween(ca, {
  1993. duration: "short"
  1994. })).start("margin-right", 0, "168px"), $("adwrapper2") && ($("adwrapper2").setStyle("margin-left",
  1995. "160px"), (new Fx.Tween($("adwrapper2"), {
  1996. duration: "short"
  1997. })).start("margin-left", "160px", 0)), setTimeout(u, 300));
  1998. $(document.body).removeClass("inconversation");
  1999. q.set("disabled", !0);
  2000. q.addClass("disabled");
  2001. ha.set("disabled", !0);
  2002. q.blur();
  2003. ha.blur();
  2004. G("new");
  2005. window.onbeforeunload = null;
  2006. $(window).removeEvent("unload", F);
  2007. stopped = !0;
  2008. ma.get("html");
  2009. var g = null;
  2010. if (document.createRange && (window.getSelection || document.getSelection)) g = document.createRange(), g.selectNodeContents(ma);
  2011. wa && (oa = makeSpyOptionsForm(H, b,
  2012. d), v(oa.form), IS_MOBILE || oa.focus());
  2013. var k = new Element("div", {
  2014. "class": "newchatbtnwrapper"
  2015. });
  2016. newChatButton.addEvent("click", function() {
  2017. H()
  2018. });
  2019. k.grab(newChatButton);
  2020. var ea = !0;
  2021. c || b ? (R("text"), R("video")) : a ? (R("text"), e || R("unmoderated section")) : R("video");
  2022. (!IS_MOBILE || !ea) && t(k, !1, !1);
  2023. if (Oa && !IS_MOBILE) {
  2024. null === unmonSexyButton && (unmonSexyButton = new Element("img", {
  2025. width: 124,
  2026. height: 50,
  2027. alt: "Sexy",
  2028. styles: {
  2029. cursor: "pointer",
  2030. "vertical-align": "middle",
  2031. "margin-right": "0.5em"
  2032. }
  2033. }), unmonSexyTrack = "", window.devicePixelRatio &&
  2034. 1 < window.devicePixelRatio ? unmonSexyButton.set("src", "/static/sexbtn@2x.png?xx") : unmonSexyButton.set("src", "/static/sexbtn.png?xx"));
  2035. unmonSexyButton.addEvent("click", function() {
  2036. null !== z && z();
  2037. var b = "unmon-upper-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
  2038. b = b + (a ? "video" : "text");
  2039. window.open("http://wawadmin.omegle.com/redir/" + (IS_MOBILE ? "mob" : "y") + "?track=" + b + unmonSexyTrack)
  2040. });
  2041. null === unmonGayButton && (unmonGayButton = new Element("img", {
  2042. width: 124,
  2043. height: 50,
  2044. alt: "Gay",
  2045. styles: {
  2046. cursor: "pointer",
  2047. "vertical-align": "middle"
  2048. }
  2049. }),
  2050. unmonGayTrack = "", window.devicePixelRatio && 1 < window.devicePixelRatio ? unmonGayButton.set("src", "/static/gaybtnorange@2x.png") : unmonGayButton.set("src", "/static/gaybtnorange.png"));
  2051. unmonGayButton.addEvent("click", function() {
  2052. null !== z && z();
  2053. var b = "unmon-upper-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
  2054. b = b + (a ? "video" : "text");
  2055. window.open("http://wawadmin.omegle.com/redir/gay?track=" + b + unmonGayTrack)
  2056. });
  2057. h = new Element("div");
  2058. h.grab(unmonSexyButton);
  2059. IS_MOBILE || h.grab(unmonGayButton);
  2060. var x = new Element("span", {
  2061. html: "&times;",
  2062. styles: {
  2063. "font-weight": "bold",
  2064. color: "#555",
  2065. "font-size": "1.5em",
  2066. cursor: "pointer"
  2067. },
  2068. events: {
  2069. click: function() {
  2070. p.dispose();
  2071. chatPervTrack = [];
  2072. ra.dispose();
  2073. xa.dispose()
  2074. }
  2075. }
  2076. });
  2077. e || (h.appendText(" "), h.grab(x));
  2078. var p = v(h, !1)
  2079. }
  2080. if (!c && !b) {
  2081. var i = new Element("div", {
  2082. "class": "logtopicsettings"
  2083. }),
  2084. j = new Element("form", {
  2085. styles: {
  2086. margin: 0,
  2087. padding: 0
  2088. }
  2089. }),
  2090. x = new Element("label"),
  2091. h = function() {
  2092. r.checked ? setShouldUseEnglish(!0) : setShouldUseEnglish(!1)
  2093. },
  2094. n = new Element("input", {
  2095. type: "radio",
  2096. name: "language",
  2097. value: "mylang",
  2098. checked: !shouldUseEnglish
  2099. });
  2100. n.addEvent("click", h);
  2101. x.grab(n);
  2102. x.appendText(" My language");
  2103. j.grab(x);
  2104. j.appendText(" ");
  2105. var x = new Element("label"),
  2106. r = new Element("input", {
  2107. type: "radio",
  2108. name: "language",
  2109. value: "english",
  2110. checked: shouldUseEnglish
  2111. });
  2112. r.addEvent("click", h);
  2113. x.grab(r);
  2114. x.appendText(" English");
  2115. j.grab(x);
  2116. j.setStyle("display", "none");
  2117. i.grab(j);
  2118. var s = function() {
  2119. !IS_MOBILE || !navigator.language || "EN" === navigator.language.substr(0, 2).toUpperCase() || da.get("checked") ? j.setStyle("display", "none") : j.setStyle("display",
  2120. "block")
  2121. },
  2122. h = makeShouldUseLikesCheckbox(),
  2123. da = h.getElement(".shoulduselikescheckbox");
  2124. da.addEvent("click", s);
  2125. s();
  2126. i.grab(h);
  2127. h = new Element("a", {
  2128. href: "javascript:",
  2129. text: "(Settings)"
  2130. });
  2131. !shouldUseFbLikes && !topicManager.list().length && (da.set("checked", !1), da.set("disabled", !0), h.set("text", "(Enable)"));
  2132. h.addEvent("click", function(a) {
  2133. a.preventDefault();
  2134. null !== z && z();
  2135. j.dispose();
  2136. i.empty();
  2137. a = makeTopicSettings();
  2138. i.grab(j);
  2139. i.grab(a);
  2140. a.getElement("input").focus();
  2141. da = a.getElement(".shoulduselikescheckbox");
  2142. da.addEvent("click",
  2143. s);
  2144. w && w.dispose()
  2145. });
  2146. i.appendText(" ");
  2147. i.grab(h);
  2148. if (collegeAndAuth) {
  2149. var w = makeCollegeCheckboxes(!1);
  2150. i.grab(w)
  2151. } else w = null;
  2152. v(i)
  2153. }
  2154. h = new Element("div", {
  2155. "class": "logsavelinks"
  2156. });
  2157. x = new Element("span", {
  2158. "class": "conversationgreat"
  2159. });
  2160. IS_MOBILE ? x.set("text", "Great chat? Save the log!") : x.set("text", "Great chat?");
  2161. x.addEvent("click", function() {
  2162. l()
  2163. });
  2164. h.grab(x);
  2165. x = [];
  2166. n = new Element("a");
  2167. n.set("text", "Get a link");
  2168. n.set("href", "javascript:");
  2169. n.addEvent("click", function(a) {
  2170. a.preventDefault();
  2171. l()
  2172. });
  2173. x.push(n);
  2174. null !==
  2175. g && !IS_MOBILE && (n = new Element("a", {
  2176. href: "javascript:",
  2177. text: "Select all"
  2178. }), n.addEvent("click", function(a) {
  2179. a.preventDefault();
  2180. a = window.getSelection ? window.getSelection() : document.getSelection();
  2181. a.removeAllRanges();
  2182. a.addRange(g)
  2183. }), x.push(n));
  2184. var n = [],
  2185. m = new Element("a", {
  2186. href: "javascript:",
  2187. text: "Facebook"
  2188. });
  2189. m.addEvent("click", function(a) {
  2190. a.preventDefault();
  2191. l({
  2192. facebook: 1
  2193. })
  2194. });
  2195. n.push(m);
  2196. m = new Element("a", {
  2197. href: "javascript:",
  2198. text: "Tumblr"
  2199. });
  2200. m.addEvent("click", function(a) {
  2201. a.preventDefault();
  2202. l({
  2203. tumblr: 1
  2204. })
  2205. });
  2206. n.push(m);
  2207. m = new Element("a", {
  2208. href: "javascript:",
  2209. text: "Twitter"
  2210. });
  2211. m.addEvent("click", function(a) {
  2212. a.preventDefault();
  2213. var a = screen.height,
  2214. b = Math.round(screen.width / 2 - 275),
  2215. c = 0;
  2216. 420 < a && (c = Math.round(a / 2 - 210));
  2217. window.open("", "intent", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left=" + b + ",top=" + c);
  2218. l({
  2219. tweet: 1
  2220. }, {
  2221. target: "intent"
  2222. })
  2223. });
  2224. n.push(m);
  2225. m = new Element("a", {
  2226. href: "javascript:",
  2227. text: "reddit"
  2228. });
  2229. m.addEvent("click", function(a) {
  2230. a.preventDefault();
  2231. l({
  2232. reddit: 1
  2233. })
  2234. });
  2235. n.push(m);
  2236. IS_MOBILE ||
  2237. (h.appendText(" Save the log: "), h.grab(middotify(x)), h.appendText(" \u2022\u00a0Or post log to: "), h.grab(middotify(n)));
  2238. x = aurrp;
  2239. if (wa || Ma && fb) t(h, !1, !1);
  2240. else if (a) {
  2241. var y = function() {
  2242. fa.empty();
  2243. 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))
  2244. },
  2245. C = function() {
  2246. na || (E--, 1 > E ? (clearInterval(O), O = null, H()) : y())
  2247. },
  2248. B = function() {
  2249. A || na ? $(document.body).removeEvent("mousemove",
  2250. B) : (O && (clearInterval(O), O = null), P && (clearTimeout(P), P = null), I = !0, y(), P = setTimeout(function() {
  2251. P = null;
  2252. I = !1;
  2253. y();
  2254. !O && (!A && !na) && (O = setInterval(C, 1E3))
  2255. }, 200))
  2256. },
  2257. E = 1,
  2258. A = !x || z(),
  2259. K = !1,
  2260. I = !1,
  2261. D = new Element("div", {
  2262. styles: {
  2263. "vertical-align": "middle"
  2264. }
  2265. }),
  2266. S = new Element("span");
  2267. D.grab(S);
  2268. D.appendText(" ");
  2269. var M = new Element("input");
  2270. M.set("type", "button");
  2271. M.set("value", "Stop");
  2272. z = function() {
  2273. A || (null !== O && (clearInterval(O), O = null), A = !0, $(document.body).removeEvent("mousemove", B), y())
  2274. };
  2275. M.addEvent("click", function() {
  2276. z()
  2277. });
  2278. D.grab(M);
  2279. var fa = new Element("span");
  2280. D.grab(fa);
  2281. var N = new Element("label");
  2282. N.setStyle("color", "black");
  2283. N.setStyle("font-weight", "normal");
  2284. var W = new Element("input");
  2285. W.set("type", "checkbox");
  2286. W.set("checked", x);
  2287. W.addEvent("change", function() {
  2288. var a = W.checked;
  2289. aurrp = a;
  2290. Cookie.write("aurrp", a ? "1" : "0", {
  2291. duration: 365,
  2292. domain: document.domain,
  2293. path: "/"
  2294. })
  2295. });
  2296. N.grab(W);
  2297. N.appendText(" Auto-reroll next time");
  2298. y();
  2299. t(D, !1, !1);
  2300. h = D.getSize().y + "px";
  2301. D.setStyle("height", h);
  2302. D.setStyle("line-height", h);
  2303. if (!A) {
  2304. O = setInterval(C,
  2305. 500);
  2306. var P = null;
  2307. $(document.body).addEvent("mousemove", B)
  2308. }
  2309. }
  2310. c && !Ma && t("Please try to discuss the question, not just disconnect!");
  2311. if (h = e ? Pa : currentAffiliate) {
  2312. h = Q(h.variants, h);
  2313. a && h.videoMode ? h = $merge(h, h.videoMode) : !a && h.textMode && (h = $merge(h, h.textMode));
  2314. n = a ? "video" : "text";
  2315. h.trackCode && (n = h.trackCode);
  2316. h.baseTrackCode && (n = h.baseTrackCode + "-" + n);
  2317. var T, x = new Element("span"),
  2318. V = h.url.replace(/\$/g, n),
  2319. L = new Element("a", {
  2320. href: V,
  2321. target: "_blank",
  2322. events: {
  2323. click: function() {
  2324. null !== z && z()
  2325. }
  2326. }
  2327. });
  2328. L.setStyles({
  2329. "text-decoration": "none"
  2330. });
  2331. h.image && (n = new Element("img", {
  2332. src: h.image,
  2333. alt: ""
  2334. }), n.setStyles({
  2335. border: "0 none",
  2336. "vertical-align": "middle"
  2337. }), L.grab(n), L.appendText(" "));
  2338. h.text && (n = new Element("span"), n.setStyles({
  2339. color: "black",
  2340. "text-decoration": "none",
  2341. "font-weight": "normal",
  2342. background: "#EEE",
  2343. padding: "0.25em 0.5em",
  2344. "vertical-align": "middle",
  2345. "border-radius": "0.5em",
  2346. "-moz-border-radius": "0.5em",
  2347. "-webkit-border-radius": " 0.5em",
  2348. border: "1px solid #CCC"
  2349. }), n.style.lineHeight = "1.5", h.style && n.setStyles(h.style), n.set("text", h.text), L.grab(n));
  2350. x.grab(L);
  2351. var Z = new Element("span");
  2352. Z.set("html", "&times;");
  2353. Z.setStyles({
  2354. cursor: "default",
  2355. color: "black",
  2356. "font-weight": "bold"
  2357. });
  2358. Z.addEvent("click", function() {
  2359. currentAffiliate = null;
  2360. T.destroy()
  2361. });
  2362. h.noCloseButton || (x.appendText(" "), x.grab(Z));
  2363. n = new Element("div");
  2364. n.setStyle("cursor", "pointer");
  2365. n.addEvent("click", function(a) {
  2366. a = $(a.target);
  2367. !L.hasChild(a) && !(L === a || Z === a || Z.hasChild(a)) && window.open(V, "_blank")
  2368. });
  2369. n.grab(x);
  2370. T = v(n);
  2371. if (h.bottomPositioning || void 0 === h.bottomPositioning) T.setStyle("height",
  2372. n.getSize().y + "px"), n.setStyles({
  2373. position: "absolute",
  2374. bottom: "0.5em"
  2375. })
  2376. }
  2377. if (mobileAdWrapper) {
  2378. var Y = new Element("div", {
  2379. styles: {
  2380. width: mobileAdWrapperSize.x + "px",
  2381. height: mobileAdWrapperSize.y + "px"
  2382. }
  2383. });
  2384. t(Y);
  2385. ga = function() {
  2386. mobileAdWrapper.setStyles({
  2387. display: "block",
  2388. position: "absolute"
  2389. });
  2390. mobileAdWrapper.setPosition(Y.getPosition())
  2391. };
  2392. ga();
  2393. $(window).addEvent("resize", ga)
  2394. }
  2395. }
  2396. }
  2397.  
  2398. function ia(a) {
  2399. var b = new Element("iframe");
  2400. b.setStyle("border", "0 none");
  2401. b.setStyle("padding", 0);
  2402. b.set("width", 318);
  2403. C(b);
  2404. initialLogIsRecaptcha = !0;
  2405. var c = b.contentWindow ? b.contentWindow.document : b.contentDocument;
  2406. b.addEvent("load", function() {
  2407. var a = c.getElementById("theform");
  2408. a && (b.height = a.offsetHeight);
  2409. (a = c.getElementById("recaptcha_response_field")) && a.focus()
  2410. });
  2411. c.open();
  2412. c.write('<script type="application/javascript">var RecaptchaOptions = {theme: "white"};<\/script>');
  2413. c.write('<style type="text/css">html, body, form { margin: 0; padding: 0; }</style>');
  2414. c.write('<form id="theform">');
  2415. c.write('<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=' +
  2416. encodeURIComponent(a) + '"><\/script>');
  2417. c.write('<div style="padding-top: 0.5em"><input type="submit" value="Submit"></div>');
  2418. c.write("</form>");
  2419. c.close();
  2420. b.height = c.getElementById("theform").offsetHeight;
  2421. $(c.getElementById("theform")).addEvent("submit", function(a) {
  2422. a.preventDefault();
  2423. var a = c.getElementById("recaptcha_challenge_field").value,
  2424. b = c.getElementById("recaptcha_response_field").value;
  2425. k.submitRecaptcha(a, b);
  2426. setTimeout(function() {
  2427. y("Verifying...")
  2428. }, 0)
  2429. });
  2430. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent",
  2431. "CAPTCHA", "CAPTCHA shown"
  2432. ])
  2433. }
  2434.  
  2435. function F() {
  2436. !k.stopped && !pa && (k.disconnect(), t("You have disconnected.", !1), A())
  2437. }
  2438.  
  2439. function ya() {
  2440. return "Leaving this page will end your conversation."
  2441. }
  2442.  
  2443. function ka() {
  2444. if (!N.get("disabled")) switch (hb) {
  2445. case "disconnect":
  2446. G("really");
  2447. !q.get("disabled") && !IS_MOBILE && q.focus();
  2448. break;
  2449. case "really":
  2450. F();
  2451. break;
  2452. case "new":
  2453. H()
  2454. }
  2455. }
  2456.  
  2457. function G(a, b) {
  2458. var c;
  2459. switch (a) {
  2460. case "disconnect":
  2461. c = "Stop";
  2462. break;
  2463. case "really":
  2464. c = "Really?";
  2465. break;
  2466. case "new":
  2467. c = "New"
  2468. }
  2469. void 0 !== b && (c += "...");
  2470. N.set("text", c);
  2471. N.grab(new Element("div", {
  2472. "class": "btnkbshortcut",
  2473. text: "Esc"
  2474. }));
  2475. hb = a;
  2476. sa.removeClass("reallybtn");
  2477. "new" === a ? sa.addClass("newbtn") : "really" === a && sa.addClass("reallybtn")
  2478. }
  2479.  
  2480. function Na() {}
  2481.  
  2482. function ea() {
  2483. null !== S && (clearTimeout(S), S = null);
  2484. IS_MOBILE || q.focus();
  2485. var a = q.value;
  2486. if (a) {
  2487. q.value = "";
  2488. if (IS_MOBILE) {
  2489. var b = q.clone();
  2490. b.replaces(q);
  2491. q = b;
  2492. q.addEvent("focus", function() {
  2493. u()
  2494. })
  2495. } else q.focus();
  2496. Qa = "";
  2497. p("you", a);
  2498. k.sendMessage(a);
  2499. G("disconnect")
  2500. }
  2501. }
  2502.  
  2503. function da() {
  2504. S = null;
  2505. k.stopTyping()
  2506. }
  2507. $("appstore") && $("appstore").destroy();
  2508. $("footer") && $("footer").destroy();
  2509. f && shouldForceUnmonitored && (e = !0);
  2510. mobileAdWrapper && mobileAdWrapper.setStyle("display", "none");
  2511. stopFlashing();
  2512. IS_MOBILE || startSpinner();
  2513. var fa = new Date,
  2514. wa = "string" === typeof b,
  2515. Ma = !1,
  2516. fb = !1;
  2517. $(document.body).addClass("inconversation");
  2518. a ? $(document.body).addClass("videochat") : $(document.body).removeClass("videochat");
  2519. var W = new Element("div", {
  2520. "class": "chatbox3"
  2521. }),
  2522. Z = new Element("div", {
  2523. "class": "chatbox2"
  2524. }),
  2525. Ra = new Element("div", {
  2526. "class": "chatbox"
  2527. });
  2528. IS_MOBILE && W.grab(logoElt);
  2529. var ca = new Element("div", {
  2530. "class": "logwrapper",
  2531. styles: {
  2532. top: contentTop + "px"
  2533. }
  2534. }),
  2535. Sa = new Element("div", {
  2536. "class": "logbox"
  2537. }),
  2538. ma = new Element("div");
  2539. IS_MOBILE || ma.setStyles({
  2540. position: "relative",
  2541. "min-height": "100%"
  2542. });
  2543. Sa.grab(ma);
  2544. ca.grab(Sa);
  2545. var vb = new Element("div", {
  2546. "class": "logwrapperpush"
  2547. });
  2548. ca.grab(vb);
  2549. Ra.grab(ca);
  2550. var qa = new Element("div", {
  2551. "class": "controlwrapper"
  2552. }),
  2553. ib = new Element("table", {
  2554. "class": "controltable",
  2555. cellpadding: "0",
  2556. cellspacing: "0",
  2557. border: "0"
  2558. }),
  2559. jb = new Element("tbody"),
  2560. za = new Element("tr"),
  2561. Ta = new Element("td", {
  2562. "class": "disconnectbtncell"
  2563. }),
  2564. sa = new Element("div", {
  2565. "class": "disconnectbtnwrapper"
  2566. }),
  2567. N = new Element("button", {
  2568. "class": "disconnectbtn"
  2569. });
  2570. sa.grab(N);
  2571. Ta.grab(sa);
  2572. za.grab(Ta);
  2573. var kb = new Element("td", {
  2574. "class": "chatmsgcell"
  2575. }),
  2576. Ua = new Element("div", {
  2577. "class": "chatmsgwrapper"
  2578. });
  2579. if (IS_MOBILE) {
  2580. var Aa = new Element("form");
  2581. Aa.setStyles({
  2582. margin: 0,
  2583. padding: 0
  2584. });
  2585. Aa.addEvent("submit", function(a) {
  2586. a.preventDefault();
  2587. ea()
  2588. });
  2589. var q = new Element("input", {
  2590. "class": "chatmsg disabled",
  2591. disabled: !0,
  2592. placeholder: "Type your message..."
  2593. });
  2594. q.addEvent("focus", function() {
  2595. u()
  2596. });
  2597. Aa.grab(q);
  2598. Ua.grab(Aa)
  2599. } else q = new Element("textarea", {
  2600. "class": "chatmsg disabled",
  2601. cols: "80",
  2602. rows: "3",
  2603. disabled: !0
  2604. }), Ua.grab(q);
  2605. kb.grab(Ua);
  2606. za.grab(kb);
  2607. var lb = new Element("td", {
  2608. "class": "sendbthcell"
  2609. }),
  2610. mb = new Element("div", {
  2611. "class": "sendbtnwrapper"
  2612. }),
  2613. ha = new Element("button", {
  2614. "class": "sendbtn",
  2615. disabled: !0,
  2616. text: "Send"
  2617. });
  2618. ha.grab(new Element("div", {
  2619. "class": "btnkbshortcut",
  2620. text: "Enter"
  2621. }));
  2622. mb.grab(ha);
  2623. lb.grab(mb);
  2624. IS_MOBILE || za.grab(lb);
  2625. jb.grab(za);
  2626. ib.grab(jb);
  2627. qa.grab(ib);
  2628. Ra.grab(qa);
  2629. Z.grab(Ra);
  2630. W.grab(Z);
  2631. $(document.body).grab(W);
  2632. $(document.body).scrollTop = $(document.body).scrollHeight;
  2633. var ga = null,
  2634. Ia = null,
  2635. K = null,
  2636. Ja = null,
  2637. Ka = null;
  2638. IS_MOBILE ? ($(document.body).addEvent("scroll", r), $(document).addEvent("scroll", r)) : ($(document).addEvent("keydown", g), $(document).addEvent("keyup", m));
  2639. var k = new MetaBackend;
  2640. scrollElt = IS_MOBILE ? document.body : Sa;
  2641. for (var la = [], ua = !1, Ba = [{
  2642. topics: ["reddit"],
  2643. regex: /reddit/,
  2644. url: "http://wawadmin.omegle.com/redir/reddit",
  2645. text: "Psst... did you know Omegle has its own subreddit?",
  2646. image: "/static/redditalien.png"
  2647. }],
  2648. Pa = null, P = 0; P < Ba.length; P++) {
  2649. var I = Ba[P];
  2650. I.priority || (I.priority = P);
  2651. j(I)
  2652. }
  2653. Pa && j(Pa);
  2654. if (isFirstChat) {
  2655. for (P = 0; P < Ba.length; P++)
  2656. if (I = Ba[P], I.topics)
  2657. for (var Va = 0; Va < I.topics.length; Va++)
  2658. if (topicManager.check(I.topics[Va])) {
  2659. if (!IS_MOBILE || !I.noMobile)
  2660. if (null === currentAffiliate || currentAffiliate.priority < I.priority) currentAffiliate = Q(I.tests, I);
  2661. break
  2662. }
  2663. isFirstChat = !1
  2664. }
  2665. var eb = null,
  2666. db = null,
  2667. L = [],
  2668. aa = null,
  2669. gb = [],
  2670. na = !1;
  2671. if ($("logo") || logoElt)($("logo") || logoElt).addEvent("click", E), ($("logo") || logoElt).setStyle("cursor",
  2672. "pointer");
  2673. var ba = null,
  2674. O = null,
  2675. oa = null,
  2676. z = function() {
  2677. z = function() {
  2678. return !0
  2679. };
  2680. return !1
  2681. },
  2682. pa = !1;
  2683. k.addEvent("connectedToServer", function() {
  2684. N.set("disabled", !1);
  2685. window.onbeforeunload = ya;
  2686. $(window).addEvent("unload", F)
  2687. });
  2688. k.addEvent("failedToConnect", function(a) {
  2689. y("Error connecting to server. Please try again.");
  2690. A();
  2691. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle connect error", a])
  2692. });
  2693. var X = null,
  2694. Y = null,
  2695. nb = !1,
  2696. Wa = null;
  2697. k.addEvent("waiting", function() {
  2698. Wa = +new Date;
  2699. serverManager.setKnownGood();
  2700. if (wa) y("Looking for two strangers...");
  2701. else {
  2702. var a = new Element("div"),
  2703. b = new Element("div", {
  2704. text: "Looking for someone you can chat with..."
  2705. });
  2706. a.grab(b);
  2707. if (Ca) {
  2708. X = new Element("div", {
  2709. "class": "commonlikescancel",
  2710. text: "It may take a little while to find someone with common interests. If you get tired of waiting, you can "
  2711. });
  2712. var b = new Element("a", {
  2713. href: "javascript:",
  2714. text: "connect to a completely random stranger"
  2715. }),
  2716. c = function() {
  2717. Y && (clearTimeout(Y), Y = null);
  2718. X && (k.stopLookingForCommonLikes(), X.destroy(), X = null)
  2719. };
  2720. b.addEvent("click", c);
  2721. X.grab(b);
  2722. X.appendText(" instead.");
  2723. a.grab(X);
  2724. Y = setTimeout(function() {
  2725. nb = !0;
  2726. c()
  2727. }, 1E4)
  2728. }
  2729. y(a)
  2730. }
  2731. });
  2732. var bb = !1;
  2733. k.addEvent("strangerConnected", function(b) {
  2734. if (!pa) {
  2735. null !== Wa && 1E3 < +new Date - Wa && startFlashing();
  2736. bb = !0;
  2737. serverManager.setKnownGood();
  2738. if (a) try {
  2739. $("flash").gotStrangerPeerID(b)
  2740. } catch (c) {
  2741. try {
  2742. $("flash").gotStrangerPeerID(b)
  2743. } catch (d) {}
  2744. }
  2745. Y && (clearTimeout(Y), Y = null);
  2746. 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() ?
  2747. "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())
  2748. }
  2749. });
  2750. k.addEvent("gotMessage", function(a) {
  2751. D();
  2752. a = a.replace(/^[\r\n]+/g, "");
  2753. navigator.notification && navigator.notification.beep &&
  2754. navigator.notification.beep(1);
  2755. p("stranger", a)
  2756. });
  2757. k.addEvent("gotMessageHTML", function(a) {
  2758. D();
  2759. var b = new Element("p", {
  2760. "class": "strangermsg"
  2761. }),
  2762. c = new Element("strong", {
  2763. "class": "msgsource"
  2764. });
  2765. c.appendText("Stranger: ");
  2766. b.grab(c);
  2767. b.appendText(" ");
  2768. a = new Element("span", {
  2769. html: a
  2770. });
  2771. b.grab(a);
  2772. v(b);
  2773. ua || la.push(["Stranger:", a.get("text")])
  2774. });
  2775. k.addEvent("strangerDisconnected", function() {
  2776. t("Stranger has disconnected.");
  2777. A()
  2778. });
  2779. k.addEvent("typing", function() {
  2780. M("Stranger")
  2781. });
  2782. k.addEvent("stoppedTyping", D);
  2783. k.addEvent("recaptchaRequired",
  2784. ia);
  2785. k.addEvent("recaptchaRejected", ia);
  2786. k.addEvent("connectionDied", function(a) {
  2787. var b = "Technical error";
  2788. a && (b += ": " + a + " Sorry. :( Omegle understands if you hate it now, but Omegle still loves you.");
  2789. t(b);
  2790. serverManager.unsetKnownGood();
  2791. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle error", a ? a : "(error)", k.server]);
  2792. A()
  2793. });
  2794. k.addEvent("question", function(a) {
  2795. var b = new Element("div", {
  2796. "class": "question"
  2797. }),
  2798. c = new Element("div", {
  2799. "class": "questionHeading",
  2800. text: "Question to discuss:"
  2801. });
  2802. b.grab(c);
  2803. c =
  2804. new Element("div", {
  2805. "class": "questionText"
  2806. });
  2807. c.appendText(a);
  2808. b.grab(c);
  2809. la.push(["Question to discuss:", a]);
  2810. v(b)
  2811. });
  2812. k.addEvent("spyMessage", function(a, b) {
  2813. var c = "Stranger 1" === a ? "youmsg" : "strangermsg";
  2814. J(a);
  2815. startFlashing();
  2816. w(a, c, b)
  2817. });
  2818. k.addEvent("spyDisconnected", function(a) {
  2819. t(a + " has disconnected");
  2820. A()
  2821. });
  2822. k.addEvent("spyTyping", M);
  2823. k.addEvent("spyStoppedTyping", J);
  2824. k.addEvent("error", function(a) {
  2825. t(a);
  2826. A()
  2827. });
  2828. var cb = !1;
  2829. k.addEvent("serverMessage", function(a) {
  2830. -1 !== a.indexOf("language") && (cb = !0, !IS_MOBILE && "undefined" !==
  2831. typeof googTr && (a += ' (Select "English" from the menu in the corner to disable.)'));
  2832. t(a, !1)
  2833. });
  2834. k.addEvent("antinudeBanned", function(a) {
  2835. t("Banned.");
  2836. A();
  2837. null !== z && z();
  2838. top.location.href = a
  2839. });
  2840. var Xa = null,
  2841. V = null;
  2842. k.addEvent("commonLikes", function(a) {
  2843. if (a.length) {
  2844. V = a;
  2845. 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 ");
  2846. a += ".";
  2847. Xa && Xa.destroy();
  2848. Xa = t(a)
  2849. }
  2850. });
  2851. k.addEvent("partnerCollege", function(a) {
  2852. t("Stranger's college: " + a)
  2853. });
  2854. var La = null;
  2855. k.addEvent("identDigests",
  2856. function(a) {
  2857. La = a
  2858. });
  2859. var hb = "disconnect";
  2860. ha.addEvent("click", ea);
  2861. G("disconnect");
  2862. N.addEvent("click", ka);
  2863. var Oa = !1,
  2864. ra, xa;
  2865. ! function() {
  2866. if (Oa) return !0;
  2867. if (IS_MOBILE || !e) return !1;
  2868. Oa = !0;
  2869. ra = new Element("td", {
  2870. "class": "lowersexybtncell"
  2871. });
  2872. var b = new Element("div", {
  2873. "class": "lowersexybtnwrapper"
  2874. }),
  2875. c = "unmon-lower-" + (shouldForceUnmonitored ? "" : "not") + "forced-",
  2876. c = c + (a ? "video" : "text"),
  2877. d = new Element("button", {
  2878. "class": "lowersexybtn",
  2879. text: "Pervy Girls (Free, 18+)",
  2880. events: {
  2881. click: function(a) {
  2882. a.preventDefault();
  2883. z && z();
  2884. window.open("http://wawadmin.omegle.com/redir/y?track=" +
  2885. c)
  2886. }
  2887. }
  2888. });
  2889. b.grab(d);
  2890. ra.grab(b);
  2891. Ta.grab(ra, "after");
  2892. xa = new Element("td", {
  2893. "class": "lowergaybtncell"
  2894. });
  2895. var b = new Element("div", {
  2896. "class": "lowergaybtnwrapper"
  2897. }),
  2898. f = new Element("button", {
  2899. "class": "lowergaybtn",
  2900. text: "\u00a0gay cams\u00a0 (free" + (e ? "" : ", 18+") + ")",
  2901. events: {
  2902. click: function(a) {
  2903. a.preventDefault();
  2904. z && z();
  2905. window.open("http://wawadmin.omegle.com/redir/gay?track=" + c)
  2906. }
  2907. }
  2908. });
  2909. b.grab(f);
  2910. xa.grab(b);
  2911. ra.grab(xa, "after");
  2912. "undefined" === typeof doUnmonSexyTest && (doUnmonSexyTest = 0.5 > Math.random());
  2913. c += "-none-" + (doUnmonSexyTest ?
  2914. "y" : "n");
  2915. Na = function() {
  2916. var a = ["\ud83d\udc8b *soft moan*", "adult cams (free)"];
  2917. a[1] = "girl\u00a0cams \u00a0\u00a0(free)\u00a0\u00a0";
  2918. for (var b = null;
  2919. "string" !== typeof a;) b = Math.floor(Math.random() * a.length), a = a[b];
  2920. d.set("text", a);
  2921. chatOddEven ? (a = f, b = d) : (a = d, b = f);
  2922. var c = "0 0 40px 10px #F0F inset",
  2923. c = "";
  2924. a.setStyles({
  2925. "box-shadow": c,
  2926. "-webkit-box-shadow": c,
  2927. "-moz-box-shadow": c,
  2928. background: "red",
  2929. background: "#FF7F00"
  2930. });
  2931. lastActiveUnmonSexy = a;
  2932. b.setStyles({
  2933. "box-shadow": "none",
  2934. "-webkit-box-shadow": "none",
  2935. "-moz-box-shadow": "none",
  2936. "font-weight": "normal",
  2937. background: "white",
  2938. color: "black"
  2939. })
  2940. };
  2941. Na();
  2942. return !0
  2943. }() && !e && chatPervTrack.push(!1);
  2944. "undefined" === typeof doAVCtest && (doAVCtest = 0.5 > Math.random());
  2945. if (e && a) {
  2946. if (!$("abovevideosexybtn")) {
  2947. var ob = new Element("div", {
  2948. styles: {
  2949. background: "red",
  2950. color: "white",
  2951. "font-size": "30px",
  2952. height: "30px",
  2953. "line-height": "30px",
  2954. "vertical-align": "middle",
  2955. cursor: "pointer",
  2956. "text-align": "center",
  2957. padding: "10px 0",
  2958. "margin-bottom": "10px",
  2959. "border-radius": "20px"
  2960. },
  2961. id: "abovevideosexybtn",
  2962. events: {
  2963. click: function(a) {
  2964. a.preventDefault();
  2965. z && z();
  2966. window.open("http://wawadmin.omegle.com/redir/y?track=avc-108-" + (doAVCtest ? "y" : "n"))
  2967. }
  2968. }
  2969. });
  2970. ob.appendText("What happens if click?");
  2971. $("flashwrapper").grab(ob, "top")
  2972. }
  2973. } else $$("#abovevideosexybtn").dispose();
  2974. if (a) {
  2975. var Da = function(a) {
  2976. var b = $("flash");
  2977. if (ca.getSize && b.getPosition && $(window).getSize) {
  2978. var c = $(window).getSize(),
  2979. d = 520 * ca.getSize().y / 488,
  2980. e = c.y - b.getPosition().y - 24;
  2981. d > e && (d = e, !0 !== a && setTimeout(function() {
  2982. Da(!0)
  2983. }, 200));
  2984. 320 > d && (d = 320);
  2985. a = 320 * d / 520;
  2986. a > c.x / 2 && (a = c.x / 2, d = 520 * a / 320);
  2987. b.setStyles({
  2988. width: Math.floor(a) +
  2989. "px",
  2990. height: Math.floor(d) + "px"
  2991. });
  2992. b.blur();
  2993. (new Elements([qa, ca])).setStyle("margin-left", a + 8 + "px")
  2994. }
  2995. };
  2996. Da();
  2997. $(window).addEvent("resize", Da);
  2998. ga = Da
  2999. }
  3000. var Qa = q.value,
  3001. S = null;
  3002. q.addEvent("keydown", function(a) {
  3003. 13 == a.code && (!a.shift && !a.alt && !a.meta) && (ea(), a.preventDefault())
  3004. });
  3005. q.addEvent("keypress", function() {
  3006. setTimeout(function() {
  3007. q.value !== Qa && (Qa = q.value, null === S && k.typing(), null !== S && (clearTimeout(S), S = null), S = setTimeout(da, 5E3))
  3008. }, 0)
  3009. });
  3010. y("Connecting to server...");
  3011. var ta = null,
  3012. Ca = !1,
  3013. Ea = [],
  3014. va = null,
  3015. Ya = null,
  3016. Fa = null,
  3017. Za = !1;
  3018. if (!c && !b && !e) {
  3019. if (shouldUseLikes) {
  3020. if (shouldUseFbLikes) var pb = FB.getAuthResponse(),
  3021. ta = pb ? pb.accessToken : null;
  3022. Ea = topicManager.list();
  3023. Ca = Ea.length || null !== ta
  3024. }
  3025. "none" !== collegeMode && collegeAndAuth && (Za = "any" === collegeMode, Ya = collegeAndAuth[0], Fa = collegeAndAuth[1])
  3026. }
  3027. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle chat", function() {
  3028. var d = [];
  3029. IS_MOBILE && d.push("mobile");
  3030. b ? d.push("spy") : c ? d.push("spyee") : a ? (d.push("video"), flashWatermarkTrack && d.push(flashWatermarkTrack)) : d.push("text");
  3031. e && (d.push("unmonitored"), shouldForceUnmonitored && d.push("(forced)"));
  3032. Ca && (d.push("topical"), ta && d.push("(FB)"));
  3033. "none" !== collegeMode && Fa && d.push("college");
  3034. d[0] = d[0][0].toUpperCase() + d[0].substr(1);
  3035. return d.join(" ")
  3036. }()]);
  3037. if (e) {
  3038. "undefined" === typeof unmonChatCount && (unmonAdCount = unmonChatCount = 0);
  3039. if (1 > unmonAdCount && 4 <= unmonChatCount) {
  3040. unmonAdCount++;
  3041. var qb = 0.5 > Math.random(),
  3042. Ga = "gwfy9-" + (qb ? "y" : "n"),
  3043. $a = new Element("div", {
  3044. styles: {
  3045. width: "40em",
  3046. border: "1px solid #3F9FFF",
  3047. "border-top-left-radius": "0.5em",
  3048. "border-top-right-radius": "0.5em",
  3049. overflow: "hidden"
  3050. }
  3051. }),
  3052. rb = function() {
  3053. ab("accept");
  3054. window.open("http://wawadmin.omegle.com/redir/y?track=interchat-" + Ga)
  3055. },
  3056. ab = function(a) {
  3057. (new Image).src = "http://wawadmin.omegle.com/redir/interchatexit?track=" + a + "-" + Ga
  3058. },
  3059. wb = new Element("div", {
  3060. styles: {
  3061. background: "#3F9FFF",
  3062. color: "white",
  3063. "font-size": "1.5em",
  3064. padding: "0.3333em",
  3065. "font-weight": "bold",
  3066. "text-align": "center",
  3067. "text-shadow": "0 0 15px #3F3F3F",
  3068. "-webkit-text-shadow": "0 0 15px #3F3F3F",
  3069. "-moz-text-shadow": "0 0 15px #3F3F3F",
  3070. cursor: "pointer"
  3071. },
  3072. events: {
  3073. click: rb
  3074. },
  3075. text: qb ? "A girl wants you" : "Girls want you"
  3076. });
  3077. $a.grab(wb);
  3078. var ja = new Element("div", {
  3079. styles: {
  3080. padding: "0.5em",
  3081. position: "relative",
  3082. overflow: "hidden"
  3083. }
  3084. });
  3085. ja.setStyle("padding-bottom", "3.5em");
  3086. var xb = new Element("div", {
  3087. html: ""
  3088. });
  3089. ja.grab(xb);
  3090. var sb = new Element("div", {
  3091. styles: {
  3092. position: "absolute",
  3093. right: 0,
  3094. bottom: 0,
  3095. "border-top": "1px solid #3F9FFF",
  3096. "border-left": "1px solid #3F9FFF",
  3097. padding: "0.5em",
  3098. "text-align": "center",
  3099. cursor: "pointer",
  3100. height: "1em",
  3101. position: "absolute",
  3102. background: "white",
  3103. color: "black"
  3104. },
  3105. events: {
  3106. click: function() {
  3107. ab("refuse");
  3108. H()
  3109. }
  3110. }
  3111. }),
  3112. yb = new Element("span", {
  3113. text: "No",
  3114. styles: {
  3115. "vertical-align": "middle"
  3116. }
  3117. });
  3118. sb.grab(yb);
  3119. var tb = new Element("div", {
  3120. styles: {
  3121. position: "absolute",
  3122. bottom: 0,
  3123. left: 0,
  3124. background: "#3F9FFF",
  3125. padding: "0.5em",
  3126. "text-align": "center",
  3127. color: "white",
  3128. cursor: "pointer",
  3129. height: "1.5em",
  3130. "border-top": "1px solid #3F9FFF",
  3131. "border-right": "1px solid #3F9FFF",
  3132. width: "15.25em",
  3133. "z-index": "1",
  3134. "border-top-right-radius": "0.5em"
  3135. },
  3136. events: {
  3137. click: rb
  3138. }
  3139. }),
  3140. zb = new Element("span", {
  3141. text: "Give me girls",
  3142. styles: {
  3143. "font-size": "1.5em",
  3144. "vertical-align": "middle",
  3145. "text-shadow": "0 0 15px #3F3F3F",
  3146. "-webkit-text-shadow": "0 0 15px #3F3F3F",
  3147. "-moz-text-shadow": "0 0 15px #3F3F3F"
  3148. }
  3149. });
  3150. tb.grab(zb);
  3151. ja.grab(sb);
  3152. ja.grab(tb);
  3153. var ub = new Element("div", {
  3154. styles: {
  3155. position: "absolute",
  3156. bottom: 0,
  3157. left: "15.75em",
  3158. background: "#FF7F00",
  3159. padding: "0.5em 0.5em 0.5em 1em",
  3160. "text-align": "center",
  3161. color: "white",
  3162. cursor: "pointer",
  3163. height: "1.5em",
  3164. "border-top": "1px solid #FF7F00",
  3165. "border-right": "1px solid #FF7F00",
  3166. width: "15.25em",
  3167. "border-top-right-radius": "0.5em",
  3168. "z-index": "0"
  3169. },
  3170. events: {
  3171. click: function() {
  3172. ab("gayaccept");
  3173. window.open("http://wawadmin.omegle.com/redir/gay?track=interchat-" + Ga)
  3174. }
  3175. }
  3176. }),
  3177. Ab = new Element("span", {
  3178. text: "Free gay cams",
  3179. styles: {
  3180. "font-size": "1.5em",
  3181. "vertical-align": "middle",
  3182. "text-shadow": "0 0 15px #7F7F7F",
  3183. "-webkit-text-shadow": "0 0 15px #7F7F7F",
  3184. "-moz-text-shadow": "0 0 15px #7F7F7F"
  3185. }
  3186. });
  3187. ub.grab(Ab);
  3188. ja.grab(ub);
  3189. $a.grab(ja);
  3190. C($a);
  3191. N.set("disabled", !0);
  3192. (new Image).src = "http://wawadmin.omegle.com/redir/interchatenter?track=" + Ga;
  3193. return
  3194. }
  3195. unmonChatCount++
  3196. }
  3197. var Ha =
  3198. null;
  3199. 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));
  3200. if (a) {
  3201. flashCb_gotNearID = function(a, b) {
  3202. resetStratusCallbacks();
  3203. k.connect(a, null, !1, !1, ta, Ea, e ? "unmon" : null, Ha, b, !1, Ya, Fa, Za)
  3204. };
  3205. flashCb_errorConnectingToStratus = function() {
  3206. resetStratusCallbacks();
  3207. y("Error connecting to Adobe Stratus. Please try again.");
  3208. A()
  3209. };
  3210. try {
  3211. $("flash").startChat(rtmfpServer)
  3212. } catch (Bb) {
  3213. try {
  3214. $("flash").startChat(rtmfpServer)
  3215. } catch (Cb) {
  3216. A(), H(!1)
  3217. }
  3218. }
  3219. e || (va = setTimeout(function() {
  3220. va = null;
  3221. var a = new Date;
  3222. lastScreenshotTime && 6E4 > a - lastScreenshotTime || (lastScreenshotTime = a, Math.random() > screenshotPercent || $("flash") && ($("flash").postScreenshot && antinudeServers.length) && $("flash").postScreenshot(antinudeServers[$random(0, antinudeServers.length - 1)], 4, 300))
  3223. }, $random(1500, 5E3)))
  3224. } else k.connect(null, b, c, d, ta, Ea, e ? "unmon" : null, Ha, null, !1, Ya, Fa, Za);
  3225. serverManager.unsetKnownGood()
  3226. }
  3227. var userMedia = null,
  3228. WEB_RTC_CONFIG = {
  3229. iceServers: [{
  3230. url: "stun:stun.l.google.com:19302"
  3231. }]
  3232. },
  3233. WEB_RTC_MEDIA_CONSTRAINTS = {
  3234. mandatory: {
  3235. OfferToReceiveAudio: !0,
  3236. OfferToReceiveVideo: !0
  3237. }
  3238. },
  3239. WEB_RTC_PEER_CONSTRAINTS = {
  3240. optional: [{
  3241. DtlsSrtpKeyAgreement: !0
  3242. }]
  3243. };
  3244. window.RTCPeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  3245. window.RTCIceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate || window.webkitRTCIceCandidate;
  3246. window.RTCSessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription || window.webkitRTCSessionDescription;
  3247. navigator.getUserMedia = navigator.mozGetUserMedia || navigator.getUserMedia || navigator.webkitGetUserMedia;
  3248. var logoShadowImg = null;
  3249.  
  3250. function requestFullscreen(a) {
  3251. a = a || document.documentElement;
  3252. a.requestFullscreen ? a.requestFullscreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen()
  3253. }
  3254.  
  3255. function startMobileVideo() {
  3256. function a(a) {
  3257. a.preventDefault();
  3258. for (var b = 0; b < a.changedTouches.length; b++) {
  3259. var c = a.changedTouches[b];
  3260. if (c.identifier === J) {
  3261. if (T) {
  3262. var a = c.pageX - p.clientWidth / 2,
  3263. b = s.clientWidth,
  3264. c = p.clientWidth,
  3265. d = Math.max(b / 2, b - 300),
  3266. a = Math.max(d, a);
  3267. p.setStyle("left", a + "px");
  3268. p.setStyle("right", "auto");
  3269. w.setStyle("width", b - a - c + "px")
  3270. } 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",
  3271. b - a - c + "px");
  3272. b - a > 2.5 * c && C.setStyle("display", "none");
  3273. D = a <= d;
  3274. break
  3275. }
  3276. }
  3277. }
  3278.  
  3279. function b(c) {
  3280. c.preventDefault();
  3281. for (var d = 0; d < c.changedTouches.length; d++)
  3282. if (c.changedTouches[d].identifier === J) {
  3283. M = setTimeout(function() {
  3284. M = null;
  3285. C.setStyle("display", "none");
  3286. B.set("display", H)
  3287. }, 500);
  3288. p.setStyle("background", "rgba(255, 0, 0, 0.5)");
  3289. 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));
  3290. w.setStyle("display", "none");
  3291. window.removeEventListener("touchmove",
  3292. a);
  3293. window.removeEventListener("touchend", b);
  3294. J = null;
  3295. D && r();
  3296. break
  3297. }
  3298. }
  3299.  
  3300. function c() {
  3301. var a = s.getSize();
  3302. a.x > a.y ? (T = !0, p.setStyles({
  3303. left: "auto",
  3304. bottom: "auto",
  3305. right: 0,
  3306. top: "33.33%",
  3307. width: "3em",
  3308. height: "33.33%",
  3309. "border-top-left-radius": "1em",
  3310. "border-bottom-left-radius": "1em",
  3311. "border-top-right-radius": 0,
  3312. "border-bottom-right-radius": 0
  3313. }), w.setStyles({
  3314. left: "auto",
  3315. bottom: "auto",
  3316. right: 0,
  3317. top: "33.33%",
  3318. width: "0",
  3319. height: "33.33%"
  3320. })) : (T = !1, p.setStyles({
  3321. top: "auto",
  3322. right: "auto",
  3323. bottom: 0,
  3324. left: "33.33%",
  3325. height: "3em",
  3326. width: "33.33%",
  3327. "border-top-left-radius": "1em",
  3328. "border-bottom-left-radius": 0,
  3329. "border-top-right-radius": "1em",
  3330. "border-bottom-right-radius": 0
  3331. }), w.setStyles({
  3332. top: "auto",
  3333. right: "auto",
  3334. bottom: 0,
  3335. left: "33.33%",
  3336. height: 0,
  3337. width: "33.33%"
  3338. }))
  3339. }
  3340.  
  3341. function d(a, b) {
  3342. var c = a.match(b);
  3343. return c && 2 == c.length ? c[1] : null
  3344. }
  3345.  
  3346. function e(a) {
  3347. for (var b = a.sdp, c = b.split("\r\n"), e = 0; e < c.length; e++)
  3348. if (-1 !== c[e].search("m=audio")) {
  3349. var f = e;
  3350. break
  3351. }
  3352. if (null !== f) {
  3353. for (e = 0; e < c.length; e++)
  3354. if (-1 !== c[e].search("opus/48000")) {
  3355. var g = d(c[e], /:(\d+) opus\/48000/i);
  3356. if (g) {
  3357. for (var b =
  3358. 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]);
  3359. g = j.join(" ");
  3360. b[e] = g
  3361. }
  3362. break
  3363. }
  3364. b = c[f].split(" ");
  3365. for (e = c.length - 1; 0 <= e; e--)
  3366. 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);
  3367. c[f] = b.join(" ");
  3368. b = c.join("\r\n")
  3369. }
  3370. a.sdp = b;
  3371. E.setLocalDescription(a);
  3372. F.sendRTCPeerDescription(a)
  3373. }
  3374.  
  3375. function f() {
  3376. if (!ia) {
  3377. ia = !0;
  3378. try {
  3379. E.close()
  3380. } catch (a) {}
  3381. Q.dispose();
  3382. p.setStyle("display", "none");
  3383. w.setStyle("display", "none");
  3384. H = "table";
  3385. B.setStyle("display",
  3386. "table");
  3387. var b = new Element("span", {
  3388. styles: {
  3389. padding: "0.5em",
  3390. background: "#007fff",
  3391. color: "white",
  3392. "font-weight": "bold",
  3393. "border-radius": "0.5em",
  3394. "-webkit-border-radius": "0.5em"
  3395. },
  3396. text: ">> New chat >>",
  3397. events: {
  3398. click: function() {
  3399. i();
  3400. startMobileVideo()
  3401. }
  3402. }
  3403. }),
  3404. b = (new Element("div", {
  3405. styles: {
  3406. height: "3em",
  3407. "line-height": "3"
  3408. }
  3409. })).grab(b);
  3410. v.grab(b);
  3411. if (mobileAdWrapper && mobileAdWrapperSize && mobileAdWrapperSize.y) {
  3412. var c = new Element("div", {
  3413. styles: {
  3414. width: mobileAdWrapperSize.x + "px",
  3415. height: mobileAdWrapperSize.y + "px",
  3416. margin: Math.floor(mobileAdWrapperSize.y /
  3417. 4) + "px auto"
  3418. }
  3419. });
  3420. v.grab(c);
  3421. mobileAdWrapper.setStyles({
  3422. position: "absolute",
  3423. display: "block",
  3424. background: "red",
  3425. "z-index": "1000"
  3426. });
  3427. mobileAdWrapper.setPosition(c.getPosition());
  3428. l = function() {
  3429. mobileAdWrapper.setPosition(c.getPosition())
  3430. };
  3431. window.addEvent("resize", l);
  3432. setTimeout(l, 0);
  3433. setTimeout(l, 1);
  3434. setTimeout(l, 10);
  3435. setTimeout(l, 100)
  3436. }
  3437. b = new Element("a", {
  3438. text: "(Back to homepage)",
  3439. href: "javascript:",
  3440. events: {
  3441. click: function(a) {
  3442. a.preventDefault();
  3443. i();
  3444. showIntro()
  3445. }
  3446. },
  3447. styles: {
  3448. color: "#3f9fff"
  3449. }
  3450. });
  3451. b = (new Element("div", {
  3452. styles: {
  3453. "margin-top": mobileAdWrapper &&
  3454. mobileAdWrapperSize && mobileAdWrapperSize.y ? 0 : "1.5em"
  3455. }
  3456. })).grab(b);
  3457. v.grab(b);
  3458. $(window).removeEvent("unload", r)
  3459. }
  3460. }
  3461.  
  3462. function i() {
  3463. $(window).removeEvent("resize", c);
  3464. l && $(window).removeEvent("resize", l);
  3465. s.dispose()
  3466. }
  3467.  
  3468. function g(a) {
  3469. ia || (t.set("text", a), ka && F.disconnect(), f())
  3470. }
  3471.  
  3472. function m() {
  3473. g("Connection error. :-(")
  3474. }
  3475.  
  3476. function r() {
  3477. g("You disconnected.")
  3478. }
  3479.  
  3480. function u() {
  3481. j.src = window.URL && URL.createObjectURL ? URL.createObjectURL(userMedia) : userMedia;
  3482. E.addStream(userMedia);
  3483. t.set("text", "Connecting...");
  3484. ka = !0;
  3485. F.connect(null,
  3486. null, !1, !1, null, null, null, null, null, !0)
  3487. }
  3488. $("header") && (savedHeader = $("header"), $("header").dispose());
  3489. $("intro") && (savedIntro = $("intro"), $("intro").dispose());
  3490. $("footer") && $("footer").dispose();
  3491. $("mobileadwrapper") && $("mobileadwrapper").setStyle("display", "none");
  3492. var l = null,
  3493. s = new Element("div", {
  3494. styles: {
  3495. background: "black",
  3496. width: "100%",
  3497. height: "100%",
  3498. position: "relative",
  3499. overflow: "hidden"
  3500. }
  3501. }),
  3502. Q = new Element("video", {
  3503. autoplay: !0,
  3504. styles: {
  3505. position: "absolute",
  3506. left: 0,
  3507. top: 0,
  3508. width: "100%",
  3509. height: "100%"
  3510. }
  3511. });
  3512. s.grab(Q);
  3513. var j = new Element("video", {
  3514. autoplay: !0,
  3515. muted: !0,
  3516. styles: {
  3517. position: "absolute",
  3518. left: 0,
  3519. bottom: 0,
  3520. width: "100px",
  3521. height: "100px"
  3522. }
  3523. });
  3524. s.grab(j);
  3525. var B = new Element("div", {
  3526. styles: {
  3527. display: "table",
  3528. position: "absolute",
  3529. width: "100%",
  3530. height: "100%"
  3531. }
  3532. }),
  3533. v = new Element("div", {
  3534. styles: {
  3535. display: "table-cell",
  3536. width: "100%",
  3537. height: "100%",
  3538. "vertical-align": "middle",
  3539. "text-align": "center",
  3540. color: "white",
  3541. "font-size": "2em"
  3542. }
  3543. }),
  3544. t = new Element("div", {
  3545. styles: {
  3546. "text-shadow": "white 0 0 0.5em"
  3547. }
  3548. });
  3549. v.grab(t);
  3550. B.grab(v);
  3551. s.grab(B);
  3552. var C = new Element("div", {
  3553. styles: {
  3554. position: "absolute",
  3555. width: "100%",
  3556. height: "100%",
  3557. display: "none"
  3558. }
  3559. }),
  3560. y = new Element("div", {
  3561. styles: {
  3562. display: "table-cell",
  3563. width: "100%",
  3564. height: "100%",
  3565. "text-align": "center",
  3566. "vertical-align": "middle",
  3567. color: "white",
  3568. "text-shadow": "0 0 0.5em black"
  3569. },
  3570. text: "Slide to confirm."
  3571. });
  3572. C.grab(y);
  3573. s.grab(C);
  3574. var w = new Element("div", {
  3575. styles: {
  3576. background: "#7F0000",
  3577. position: "absolute",
  3578. display: "none"
  3579. }
  3580. });
  3581. s.grab(w);
  3582. var p = new Element("div", {
  3583. styles: {
  3584. background: "red",
  3585. color: "white",
  3586. position: "absolute",
  3587. display: "table"
  3588. }
  3589. });
  3590. p.setStyle("background",
  3591. "rgba(255, 0, 0, 0.5)");
  3592. y = new Element("div", {
  3593. styles: {
  3594. display: "table-cell",
  3595. "vertical-align": "middle",
  3596. "text-align": "center"
  3597. },
  3598. text: "Stop"
  3599. });
  3600. p.grab(y);
  3601. var J = null,
  3602. D = !1,
  3603. M = null;
  3604. p.addEventListener("touchstart", function(c) {
  3605. c.preventDefault();
  3606. p.setStyle("background", "red");
  3607. D = !1;
  3608. w.setStyle("display", "block");
  3609. null === J && (window.addEventListener("touchend", b), window.addEventListener("touchmove", a), C.setStyle("display", "table"), B.setStyle("display", "none"), null !== M && (clearTimeout(M), M = null));
  3610. J = c.changedTouches[0].identifier
  3611. });
  3612. p.addEvent("click", r);
  3613. s.grab(p);
  3614. var T = !0;
  3615. null === logoShadowImg && (logoShadowImg = new Element("img", {
  3616. src: "/static/dotcomlogoshadow" + (window.devicePixelRatio && 1 < window.devicePixelRatio ? "@2x" : "") + ".png",
  3617. width: 175,
  3618. height: 49
  3619. }));
  3620. s.grab((new Element("div", {
  3621. styles: {
  3622. position: "absolute",
  3623. top: 0,
  3624. left: 0,
  3625. width: "100%",
  3626. "text-align": "center",
  3627. opacity: "0.5"
  3628. }
  3629. })).grab(logoShadowImg));
  3630. $(document.body).grab(s);
  3631. requestFullscreen();
  3632. c();
  3633. $(window).addEvent("resize", c);
  3634. var H = "table",
  3635. E = new RTCPeerConnection(WEB_RTC_CONFIG, WEB_RTC_PEER_CONSTRAINTS);
  3636. console.log("test");
  3637. E.onaddstream = function(a) {
  3638. console.log("stream added");
  3639. H = "none";
  3640. B.setStyle("display", "none");
  3641. stopSlideRequired = !0;
  3642. Q.src = window.URL && URL.createObjectURL ? URL.createObjectURL(a.stream) : a.stream;
  3643. Q.play();
  3644. "undefined" !== typeof _gaq && _gaq.push(["_trackEvent", "Omegle chat", "WebRTC video"])
  3645. };
  3646. var U = [],
  3647. A = null;
  3648. E.onicecandidate = function(a) {
  3649. null !== A && (clearTimeout(A), A = null);
  3650. a.candidate ? (U.push(a.candidate), setTimeout(function() {
  3651. U.length && (console.log(U), F.sendICECandidates(U), U = []);
  3652. A = null
  3653. },
  3654. 300)) : U.length && (F.sendICECandidates(U), U = [])
  3655. };
  3656. E.onstatechange = function() {
  3657. ("closing" === E.readyState || "closed" === E.readyState) && m()
  3658. };
  3659. var ia = !1,
  3660. F = new MetaBackend,
  3661. ya = !1;
  3662. F.addEvent("strangerDisconnected", function() {
  3663. t.set("text", "Stranger disconnected.");
  3664. f()
  3665. });
  3666. F.addEvent("icecandidate", function(a) {
  3667. try {
  3668. E.addIceCandidate(new RTCIceCandidate(a))
  3669. } catch (b) {
  3670. console.log("unhappy ice candidate:", a)
  3671. }
  3672. });
  3673. F.addEvent("rtccall", function() {
  3674. ya = !0;
  3675. E.createOffer(e, m, WEB_RTC_MEDIA_CONSTRAINTS)
  3676. });
  3677. F.addEvent("rtcpeerdescription",
  3678. function(a) {
  3679. a = new RTCSessionDescription(a);
  3680. E.setRemoteDescription(a);
  3681. ya || setTimeout(function() {
  3682. E.createAnswer(function(a) {
  3683. e(a)
  3684. }, m, WEB_RTC_MEDIA_CONSTRAINTS)
  3685. }, 0)
  3686. });
  3687. var ka = !1;
  3688. F.addEvent("connectionDied", m);
  3689. F.addEvent("failedToConnect", m);
  3690. $(window).addEvent("unload", r);
  3691. t.set("text", "Enable camera...");
  3692. null === userMedia ? navigator.getUserMedia({
  3693. video: !0,
  3694. audio: !0
  3695. }, function(a) {
  3696. userMedia = a;
  3697. u()
  3698. }, function() {
  3699. g("Camera error. :-(")
  3700. }) : u()
  3701. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement