Chess Com Actual Focus Mode

Hides Useless Bull Shit from Chess.com UI in 'focus' Mode

目前为 2019-11-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Chess Com Actual Focus Mode
  3. // @namespace http://userstyles.org
  4. // @description Hides Useless Bull Shit from Chess.com UI in 'focus' Mode
  5. // @author 707433
  6. // @include *://*chess.com/live
  7. // @include *://*chess.com/events/*
  8. // @run-at document-start
  9. // @version 0.2
  10. // ==/UserScript==
  11.  
  12. function hide_stuff() {
  13. var sheet = window.document.styleSheets[ 0 ];
  14. sheet.insertRule( "div.new-game-component { display: none; !important }" , sheet.cssRules.length );
  15. sheet.insertRule( "span.focus-mode-icon-badge { display: none; !important }" , sheet.cssRules.length );
  16. sheet.insertRule( "div[data-clock] { visibility: hidden; !important }" , sheet.cssRules.length );
  17. sheet.insertRule( "img.user-avatar-img { visibility: hidden; !important }" , sheet.cssRules.length );
  18. sheet.insertRule( "div.cbChatMessage { visibility: hidden; !important }" , sheet.cssRules.length );
  19. sheet.insertRule( "a.placeholder-ad-link { visibility: hidden; !important }" , sheet.cssRules.length );
  20. /*
  21. for ( var i = 0; i < 100; ++i ) {
  22. sheet.insertRule( "div#cbChatPanelBody" + i.toString() + " { display: none; !important }" , sheet.cssRules.length );
  23. }
  24. */
  25. }
  26. window.addEventListener ( "load" , hide_stuff );