• Hydro
  • 我找到了让任何基于Hydro的OJ(包括旧核桃OJ)圆角的方法!

  • @ 2024-10-27 14:14:08

我找到了让任何基于Hydro的OJ(包括旧核桃OJ)圆角的方法!

首先下载暴力猴

启动暴力猴脚本,找到新建脚本,输入一下代码:

// ==UserScript==
// @name         Custom Styles for Hydro
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Apply custom styles to hydro.ac
// @author       You
// @match        https://hydro.ac/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Create a new style element
    const a = document.createElement('style');
    a.innerHTML = `
.section{
    border-radius: 10px;
}
.button, .dropdown .menu{
    border-radius: 10px;
}
body{
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco Display", "San Francisco", "Helvetica Neue", "Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK", "Source Han Sans", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}
.user-profile-badge{
    border-radius: 7px;
    box-shadow: 0px 1px 3px #656565;
}
[data-tooltip], .data-tooltip, span.time.relative.tooltip{
    border-radius: 10px;
}
input.textbox, textarea.textbox, time.relative.tooltip, .drop-target, .drop-element-attached-bottom, .drop-element-attached-center, .drop-target-attached-top, .drop-target-attached-center{
    border-radius: 10px;
}
.search>input{
    border-radius: 10px 0px 0px 0px;
}
.search>button{
    border-radius: 0px  10px 0px 0px;
}
.bp4-tag.bp4-minimal:not([class*=bp4-intent-]){
    border-radius: 10px;
}
.problem__tag-link, .select-container.compact .select, .select.compact{
    border-radius: 10px;
}
pre[class*=language-], .autocomplete-wrapper{
    border-radius: 10px;
}
.section__table-header{
    border-radius: 10px 10px 0 0;
}
div.code-toolbar>.toolbar>.toolbar-item>a, div.code-toolbar>.toolbar>.toolbar-item>button, div.code-toolbar>.toolbar>.toolbar-item>span{
    border-radius: 0 0 0 10px;
}
.contest-sidebar__bg {
    border-radius: 7px 7px 0 0;
}
blockquote {
    border-radius: 7px;
    box-shadow: 2px 3px 3px #aaa;
}
    `;

    // Append the style element to the document head
    document.head.append(a);
})();

注意前面的@match后面要改成你想要圆角的网站,这里是hydro.ac,改完之后保存,刷新一下你想要圆角的OJ平台,就圆角了

0 条评论

目前还没有评论...