Advertisement
Guest User

LiChess Chat/Spec Hider

a guest
Nov 20th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         No More Jitters
  3. // @namespace    http://en.lichess.org/@/jlobes
  4. // @version      0.0
  5. // @description  Hide LiChess spectators and non-system chat.
  6. // @author       jlobes
  7. // @match        http://*.lichess.org/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11.  
  12. //These three vars should be 0 or 1;
  13. var hideAllChat = 0; // if 1, Hides the entire chat window
  14. var hideNonSystemChat = 1; //if 1, hides messages that are not from the system (Takeback, draws, etc)
  15. var hideSpectators = 1; //If 1, hides the spectators tab.
  16.  
  17.  
  18. if(hideSpectators===1)
  19. $(".watchers").hide();
  20.  
  21. if(hideAllChat === 0)
  22. $(".messages_container").hide();
  23.  
  24. if(hideAllChat != 1){
  25.    
  26. $(document).ready(function() {
  27.  
  28.   var chatCss = {
  29.     "display":"none"
  30.   }
  31.   $("div.messages_container ol.messages li:not(.system)").css(chatCss);
  32. });
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement