Fix PKUPC UI

Fix the stupid PKUPC(Programming.Grid) UI

目前为 2021-05-22 提交的版本。查看 最新版本

// ==UserScript==
// @name         Fix PKUPC UI
// @namespace    http://tampermonkey.net/
// @version      0.1.2
// @description  Fix the stupid PKUPC(Programming.Grid) UI
// @author       You
// @match        http://www.pkupc.cn/*
// @match        https://programming.pku.edu.cn/*
// @grant        none
// @require      https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...

    $('link[type="text/css"]').remove();
    $(document.head).append(`
<style>
.header,
.menu,
.footer,
.leftMenu,
.text {
    font-size  : 14px;
    color      : #000;
    line-height: 24px;
}

.menu,
.leftMenu {
    line-height: 18px;
}

.text,
.footer {
    line-height: 20px;
}

.leftMenu {
    text-align: justify;
}

.text {
    color      : #444;
    line-height: 20px;
}

a {
    color          : #248;
    text-decoration: underline;
}

a.small {
    font-size: 11pt;
}

a:active {
    color: #a22;

}

a:hover {
    color: red;
}

a.item {
    color          : black;
    text-decoration: none;
}

a.item:active {
    color          : black;
    text-decoration: none;
}

a.item:hover {
    color          : red;
    text-decoration: underline;
}

a.gray {
    color          : gray;
    text-decoration: none;
}

a.gray:active {
    color          : gray;
    text-decoration: none;
}

a.gray:hover {
    color          : red;
    text-decoration: underline;
}

label.small {
    margin      : 0px 1px;
    border-width: 1px;
    padding     : 1px;
    font-size   : 11pt;
}

input.small {
    margin      : 0px 1px;
    border-width: 1px;
    padding     : 1px;
    font-size   : 9pt;
    border-color: #ccc;
}

.sampleData {
    background-color: #ff7;
}

.highlight,.highin {
    background-color: #ffa;
}

.highout {
    background-color: bisque;
}

.highstd {
    background-color: #eef;
}

.button {
    border-width: 1;
    padding     : 2 0 0;
}

.boxtitle {
    background-color: #ddf;
    color           : #000;
    padding         : 7;
    font-weight     : bold;
    font-size       : 12pt;
}

.boxsubmit {
    color    : #000;
    padding  : 5;
    font-size: 9pt;
}

.command {
    font-weight: normal;
    font-size  : 9pt;
}


.chapter {
    line-height: 200%;
    font-size  : 11pt;
    font-weight: bold
}

.cruces {
    list-style-type: circle;
    line-height    : 175%;
    font-size      : 10pt;
    font-weight    : bold;
}

.homework {
    list-style-type: circle;
    line-height    : 175%;
    font-size      : 10pt;
}

.problem {
    list-style-type: disc;
    line-height    : 150%;
    font-size      : 10pt;
    font-weight    : normal;
}

.classroom {
    list-style-type: disc;
    line-height    : 150%;
    font-size      : 10pt;
    font-weight    : normal;
}

.assignment {
    list-style-type: square;
    line-height    : 150%;
    font-size      : 10pt;
    font-weight    : normal;
}


.bar {
    font-weight: normal;
    font-size  : 9pt;
}

.navibar {
    background-color   : #fff;
    border-top-color   : #cdf;
    border-top-width   : 1;
    border-top-style   : solid;
    border-bottom-color: #cdf;
    border-bottom-width: 1;
    border-bottom-style: solid;
    font-size          : 9pt;
    padding            : 5;
    text-align         : right;
    width              : 100%;
}

.pagetable {
    padding: 0;
    margin : 0;
    width  : 100%;
}

.pageleft {
    background-color: bisque;
    text-align      : center;
    vertical-align  : top;
    padding         : 10;
    margin          : 0;
}

.pagemain {
    text-align    : left;
    vertical-align: top;
    padding       : 10 0 10;
    margin        : 0;
    width         : 100%;
}

.pageright {
    text-align    : center;
    vertical-align: top;
    padding       : 10 0;
    margin        : 0;
}

.lefttable {
    margin      : 5 10;
    border-color: #ffe;
    border-width: 1;
    border-style: solid;
}

.lefttd {
    padding: 5 10;
}

.righttable {
    margin: 0 10;
}

.righttd {
    padding: 5;
}

.fieldname {
    color           : #338;
    background-color: #eef;
    padding         : 5 5 3 5;
    font-weight     : bold;
}

.fieldvalue {
    background-color: #fff;
    padding         : 5 5 3 5;
    line-height     : 150%;
}

.formtitle {
    font-size  : 14pt;
    font-weight: bold;
    text-align : center;
}

.error {
    padding         : 10;
    background-color: #fff;
    color           : #f00;
    text-align      : center;
}

.hint {
    padding         : 10;
    background-color: #fff;
    color           : #f00;
    text-align      : center;
}

.formtable {
    background-color: #aaf;
    font-size       : 11pt;
}

.showtable {
    background-color: #cdf;
    font-size       : 11pt;
}

.showtitle {
    background-color: #fff;
    font-size       : 18pt;
    font-weight     : bold;
    padding         : 10;
    text-align      : center;
}

.listtable {
    border-color    : #cdf;
    border-width    : 1;
    border-style    : solid;
    background-color: #cdf;
    font-size       : 11pt;
    line-height     : 120%;
    width           : 100%;
}

.evenrow {
    background-color: #fff;
}

.oddrow {
    background-color: #eef;
}

.msgrow {
    color              : red;
    line-height        : 200%;
    font-size          : 12pt;
    font-weight        : bold;
    background-color   : white;
    border-bottom-width: 1;
    border-bottom-style: solid;
}

.listtd {
    padding: 4 5 4;
}

.listth {
    padding         : 4 5 4;
    background-color: #ccf;
    text-align      : left;
}

.box {
    font-size       : 11pt;
    border-color    : #ccf;
    border-width    : 1;
    border-style    : solid;
    background-color: #eef;
}

.box_table {
    font-size   : 11pt;
    border-color: #ccf;
    border-width: 1;
    border-style: solid;
    width       : 360px;
}

.box_header {
    border-bottom-color: #ccf;
    border-bottom-width: 1;
    border-bottom-style: solid;
    background-color   : #eef;
    padding            : 3;
}

.box_containt {
    padding    : 3;
    line-height: 150%;
}

.box_item {
    line-height: 150%;
}

.proptable {
    font-size: 9pt;
    width    : 100%;
}

.propname {
    color           : #377;
    background-color: #ddf;
}

.propvalue {
    color           : #777;
    background-color: #eef;
}
.highin,.highout {
    display: block;
    overflow: auto;
    max-width: 760px;
}
pre,code,textarea {
    font-family: Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
}
</style>`);
    $('.highin,.highout').children('br').remove();
})();

QingJ © 2025

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