Hide ChessTempo Ratings Box

Hide ratings box on ChessTempo pages.

  1. // ==UserScript==
  2. // @name Hide ChessTempo Ratings Box
  3. // @namespace http://xyxyx.org/
  4. // @description Hide ratings box on ChessTempo pages.
  5. // @include http://chesstempo.com/*
  6. // @version 0.2
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. try {
  11. // This is the ratings box permanently in the top right corner
  12. var table = document.getElementById("user-ratings-div");
  13. if (table) {
  14. console.log("Hiding ratings table");
  15. table.style.visibility="hidden";
  16. } else {
  17. console.log("Ratings table not found");
  18. }
  19.  
  20. // THis is the box which the users changed rating is placed in, after the tactic is completed
  21. var result = document.getElementsByClassName("ct-tactic-result-rating");
  22. if (result && result.length > 0) {
  23. console.log("Hiding tactic result table");
  24. result.item(0).style.visibility = "hidden";
  25. }
  26. } catch (e) {
  27. console.log("Hide ChessTemp ratings failed: " + e);
  28. }