Greasy Fork 支持简体中文。

Luogu User Content Block Remover

This removes the content blocker on Luogu user homepage.

  1. // ==UserScript==
  2. // @name Luogu User Content Block Remover
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-01-20
  5. // @match https://www.luogu.com.cn/user/*
  6. // @grant none
  7. // @author Rainbow_qwq
  8. // @description This removes the content blocker on Luogu user homepage.
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. function wait(calb, cond) {
  15. if (cond()) {
  16. return calb();
  17. } else {
  18. setTimeout(function() {
  19. wait(calb, cond);
  20. }, 0);
  21. }
  22. }
  23. wait(function() {
  24. let t = document.querySelector(".introduction.marked");
  25. if (t.style.display === "none") {
  26. t.style.display = "block";
  27. for (let i = 0; i < t.parentElement.children.length; i++) {
  28. if (t.parentElement.children[i].innerText === '系统维护,该内容暂不可见。') {
  29. t.parentElement.children[i].remove();
  30. }
  31. }
  32. }
  33. }, function() {
  34. return document.querySelector(".introduction.marked") !== null;
  35. });
  36. })();