vjudge+background

啥都没优化,就是让vjudge变得更好看了

当前为 2023-08-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name vjudge+background
  3. // @namespace vjudge-plus-v2
  4. // @version 1.5
  5. // @description 啥都没优化,就是让vjudge变得更好看了
  6. // @author axototl (original by Suntra)
  7. // @match https://vjudge.net/
  8. // @match https://vjudge.net/*
  9. // @noframes
  10. // @icon https://vjudge.net/favicon.ico
  11. // @run-at document-body
  12. // @license AGPLv3
  13. // @grant GM_addStyle
  14. // @grant GM_registerMenuCommand
  15. // @grant GM_getValue
  16. // @grant GM_setValue
  17. // @run-at document-end
  18. // ==/UserScript==
  19.  
  20. (function() {
  21. if (navigator.userAgent.includes("Chrome") && performance.getEntries()[0].responseStatus != 200) return;
  22. // 设置背景
  23. let back = GM_getValue("background", "https://cdn.luogu.com.cn/images/bg/fe/Day_And_Night_1.jpg");
  24. GM_registerMenuCommand("设置背景URL", () => {
  25. back = window.prompt("请输入背景URL", back);
  26. GM_setValue("background", back);
  27. window.alert("设置成功,刷新生效");
  28. location.reload();
  29. });
  30. // if(window.location.href.match(/\/problem\/description\/[^\/]+$/)) {
  31. // console.log("error!!!");
  32. // GM_addStyle(
  33. // "dd {background-color: rgba(255,255,255,70%) !important;border-radius: 0.25rem !important;}"
  34. // );
  35. // } else
  36. {
  37. GM_addStyle("body {background: #f0f0f0 url("+back+") no-repeat center top fixed;background-size: 100% 100%;-moz-background-size: 100% 100%;}");
  38. document.body.innerHTML = "<nav style='height: 60px'></nav>" + document.body.innerHTML;
  39. }
  40.  
  41. GM_addStyle(
  42. ".navbar {border-radius:0rem;background-color: rgba(0,0,0,65%) !important;position: fixed;top: 0;left: 0;z-index: 1000;width: 100%;}"+
  43. "::-webkit-scrollbar {display: none;}"+
  44. "#prob-ads {display: none;}"+
  45. "#img-support {display: none;}"+
  46. ".card, .list-group-item, .btn-secondary, .page-link, .page-item.disabled .page-link, .dropdown-menu {background-color: rgba(255,255,255,65%);}"+
  47. ".modal-content {background-color: rgba(255,255,255,90%);}"+
  48. ".form-control {background-color: rgba(255,255,255,50%);}"+
  49. ".tab-content {background-color: rgba(255,255,255,50%);border: 2px solid #eceeef;border-radius: 0.25rem;padding: 20px;}"+
  50. "a:focus, a:hover {color: #ff4c8c;text-decoration: underline;}"
  51. );
  52.  
  53. document.querySelector("body > div.body-footer").innerHTML += '<p style="color: #3fb98b">Theme powered by vjudge+background (original by <a href="https://github.com/dffxd-suntra/vjudge-plus">vjudge+</a>)</p>';
  54. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址