Hides Chess.com Tactics Timer Clock

chessComHideTacticsTimerClock

当前为 2018-06-03 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Hides Chess.com Tactics Timer Clock
  3. // @namespace http://userstyles.org
  4. // @description chessComHideTacticsTimerClock
  5. // @author ceberous
  6. // @homepage https://creatitees.info
  7. // @include *://*.chess.com/tactics/*
  8. // @run-at document-start
  9. // @version 0.8
  10. // ==/UserScript==
  11. var wDivClassesToHide = [
  12. "tactic-timer-container" ,
  13. "upgrade-to-remove-sidebar"
  14. ];
  15. var wDiveIDsToHide = [
  16. "special-upgrade-sidebar" ,
  17. ];
  18. function wHide() {
  19. var wElems = [];
  20. for ( var j = 0; j < wDivClassesToHide.length; ++j ) {
  21. var x11 = document.getElementsByClassName( wDivClassesToHide[ j ] );
  22. if ( !x11 ) { continue; }
  23. if ( !x11[0] ) { continue; }
  24. for ( var i = 0; i < x11.length; ++i ) { wElems.push( x11[ i ] ); }
  25. }
  26. for ( var j = 0; j < wDiveIDsToHide.length; ++j ) {
  27. var x11 = document.getElementById( wDiveIDsToHide[ j ] );
  28. if ( !x11 ) { continue; }
  29. wElems.push( x11 );
  30. }
  31. for ( var j = 0; j < wElems.length; ++j ) {
  32. wElems[ j ].setAttribute( "style" , "visibility: hidden !important" );
  33. }
  34. var no_text = document.getElementsByClassName( "info-label-label" );
  35. if ( no_text ) {
  36. if ( no_text[ 0 ] ) {
  37. no_text[ 0 ].textContent="BlessRNG";
  38. }
  39. }
  40. }
  41. (function() {
  42. wHide();
  43. setTimeout( function() { wHide(); } , 1000 );
  44. setTimeout( function() { wHide(); } , 2000 );
  45. setTimeout( function() { wHide(); } , 3000 );
  46. setTimeout( function() { wHide(); } , 4000 );
  47. setTimeout( function() { wHide(); } , 5000 );
  48. })();