Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. var emotearr = [":pepo: ", ":pepi: ", ":doge: ", ":broge: ", ":pepochu: "]
  2. var user = document.getElementById("user_profile").children[0].href.split("-")[1]
  3.  
  4. function pepo(){
  5. var finalmessage = ""
  6.  
  7. for(i = 0; i < Math.floor(Math.random() * 40); i++)
  8. finalmessage = finalmessage + emotearr[Math.floor(Math.random() * emotearr.length)]
  9.  
  10.  
  11. return finalmessage
  12. }
  13.  
  14. setInterval(function(){
  15.  
  16. for(var i = 0; i < chatView.messages.length; i++){
  17.  
  18. if(chatView.messages[i].displayName.toLowerCase() == user)
  19. self.io.emit('editShout', {shoutID:chatView.messages[i].shout_id, message:pepo(), sender:self.socketId})
  20.  
  21. }
  22.  
  23. }, 250);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement