oj.uz contest mode

Hides information on oj.uz about other user submissions to better simulate a contest environment

  1. // ==UserScript==
  2. // @name oj.uz contest mode
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-08-25
  5. // @description Hides information on oj.uz about other user submissions to better simulate a contest environment
  6. // @author You
  7. // @match https://oj.uz/problem/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @require http://code.jquery.com/jquery-latest.js
  11. // @copyright 2012+, hibbard.eu
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. const hideElements = () => {
  17. $('a:contains("Statistics")').hide();
  18. $('a:contains("Submissions")').hide();
  19. $('a:contains("Submissions")').hide();
  20. const tableRow = $('th:contains("# of submissions")').closest('table').find('tbody tr');
  21. tableRow.find("td:nth-child(3)").hide()
  22. tableRow.find("td:nth-child(4)").hide()
  23. tableRow.find("td:nth-child(5)").hide()
  24. }
  25. hideElements()
  26. // Your code here...
  27. $(document).ready(hideElements);
  28. })();