Advertisement
mateon1

Fixed the whitespace <3

Jan 10th, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. API.on(API.CHAT, (function (data) {
  2.     console.log(data);
  3.     if (/!woot/i.test(data.message)) { $("#woot").click(); }
  4.     if (/!meh/i.test(data.message)) { $("#meh").click(); }
  5.     /*if(/!curate/i.test(data.message)) { $("#curate").click(); }*/
  6.     if (/!ping/i.test(data.message)) { API.sendChat('@' + data.from + ' Pong!'); };
  7.     if (/!hide/i.test(data.message)) {
  8.         $("#chat-messages").children().each(function () {
  9.             var id = /cid-([\w\d]*)/.match($(this).attr("class"))[1];
  10.             if ($(this).find(".from").text().indexOf("Gumm") != -1) {
  11.                 API.moderateDeleteChat(id);
  12.             }
  13.         });
  14.     }
  15.     if (/!clear/i.test(data.message)) {
  16.         $("#chat-messages").children().each(function () {
  17.             var id = /cid-([\w\d]*)/.match($(this).attr("class"))[1];
  18.             if ($(this).find(".from").text().indexOf("") != -1) {
  19.                 API.moderateDeleteChat(id);
  20.             }
  21.         });
  22.     }
  23. }))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement