Chat.me

Welcome to Chat.me! Chat.me is a free non-profit chat. Chat.me is embedded in every site via iframe. It's super safe to use (the chat uses SSL certificates (HTTPS), and it's embedded in an iframe: CORS and XSS protection guaranteed). You will find a global tab to chat with everyone around the world, a site tab to chat with everyone who is visiting your same site, furthermore you can create custom rooms to chat with your friends, and pm message them too. Have fun with Chat.me!

  1. // ==UserScript==
  2. // @name Chat.me
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Welcome to Chat.me! Chat.me is a free non-profit chat. Chat.me is embedded in every site via iframe. It's super safe to use (the chat uses SSL certificates (HTTPS), and it's embedded in an iframe: CORS and XSS protection guaranteed). You will find a global tab to chat with everyone around the world, a site tab to chat with everyone who is visiting your same site, furthermore you can create custom rooms to chat with your friends, and pm message them too. Have fun with Chat.me!
  6. // @author Pietro Giucastro (pietrogiucastro@alice.it)
  7. // @match https://*
  8. // @match http://*
  9. // @match https://*/*
  10. // @match http://*/*
  11. // @require http://code.jquery.com/jquery-latest.js
  12. // @grant GM_setValue
  13. // @grant GM_getValue
  14. // ==/UserScript==
  15.  
  16. var server = 'chatme.me';
  17. var showversion = false;
  18.  
  19. if (window.location.href != window.parent.location.href) return; //if it's in iframe, return
  20.  
  21. var client = GM_getValue('client');
  22.  
  23. function errHandler(message, e) {$('body').append('<div style="position: fixed; bottom: 10px; right: 10px; color: red; z-index: 999999999999999999999999999;">'+message+'</div>'); if (e) console.log(e);}
  24.  
  25. if (client) {
  26. try {eval(client);}
  27. catch(e) {GM_setValue('client', ''); errHandler("chat.me - error parsing the client", e);}
  28. }
  29. else {
  30. var xhttp = new XMLHttpRequest();
  31. xhttp.onreadystatechange = function() {
  32. if (this.readyState == 4 && this.status == 200) {
  33. showversion = true;
  34. client = this.responseText;
  35. GM_setValue('client', client);
  36. try {eval(client);} catch(e) {errHandler("chat.me - error parsing the client", e);}
  37. }
  38.  
  39. else if (this.readyState == 4) {
  40. errHandler('There was a problem loading or updating chat me in this page. Please try in another page (e.g. <a href="https://www.google.com">www.google.com</a>');
  41. }
  42. };
  43. xhttp.open("GET", 'https://'+ server+'/clients/latest.js?_='+new Date().getTime(), true);
  44. xhttp.send();
  45. }