Advertisement
TheTintin

Untitled

Apr 4th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. // ==UserScript==
  2. // @name [Leek Wars] NoMorePoints
  3. // @version 0.0.1
  4. // @description Luttons contre les points en fin de phrase !
  5. // @author TheTintin
  6. // @match *://*.leekwars.com/*
  7. // ==/UserScript==
  8.  
  9. (function() {
  10. 'use strict';
  11.  
  12. function removePoints(message) {
  13. if(message.endsWith("..."))
  14. return message;
  15. else if(message.endsWith("."))
  16. return message.slice(0, -1);
  17. else
  18. return message;
  19. }
  20.  
  21. LW.on('pageload', function() {
  22. var chatReceive = LW.chat.receive;
  23.  
  24. LW.chat.receive = function(data) {
  25. data[3] = removePoints(data[3]);
  26. chatReceive(data);
  27. };
  28. });
  29. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement