加一些代码,让vjudge简洁

Stylus

@-moz-document url-prefix("https://cn.vjudge.net/"), url-prefix("https://vjudge.net/") {
dd {
font-family: "Noto Serif", "Noto Serif CJK SC Medium", serif;
background-color: rgba(255, 255, 255, 0.5) !important;
box-shadow: none;
} dd pre {
font-family: "DejaVu Sans Mono", serif;
}
.fa-refresh.fa-spin {
-webkit-animation: fa-spin 1s infinite;
animation: fa-spin 1s infinite;
}
.fa-spin, .fa-pulse {
animation: none;
}
.fa-2x, .fa-3x, .fa-4x, .fa-5x {
font-size: 1em !important;
}
#problem_discuss {
display: none;
}
.navbar{
z-index: 999;
width: 100%;
top: 0;
box-shadow: 0 2px 10px 0 rgba(34,36,38,.15);
border-radius: 0!important;
background-color: white !important;
padding: 0 2rem;
}
.navbar-brand{
color: blue!important;
margin: 0!important;
}
.nav-item {
margin: 0!important;
}
.nav-item>a, .navbar-brand{
color: black!important;
padding: 1em 1em !important;
font-size: 1rem;
}
.nav-item.active {
background-color: rgba(0,0,0,0.05);
}
.nav-item:hover,.nav-item:hover>input{
background-color: #f5f5f5;
}
.dropdown-menu {
border-radius: 0;
margin: 0;
}
.navbar-brand>img {
position: absolute;
left: 1em;
}
body {
background: none;
}
#code-content, code.hljs {
background: none!important;
border: 1px black dotted!important;
}
.hljs, .hljs-section, .hljs-title {
color:black;
}
}

TamperMonkey

// ==UserScript==
// @name vjudge jumper
// @namespace none
// @version 0.1
// @description jump
// @author sahdsg
// @match https://cn.vjudge.net/*
// @match https://vjudge.net/*
// @grant none
// ==/UserScript== (function() {
'use strict';
function funcs() {
var k =$("input.nav-item").val();
if(k.indexOf("!")==0) {
window.location.href='/problem#OJId=All&probNum=&title='+k.slice(1)+'&source=&category=all';
} else {
k = k.toLowerCase();
var t={
"HYSBZ":["bzoj","hysbz"],
"CodeForces":["cf", "codeforces"],
"Gym":["gym"],
"51Nod":["51nod"],
"ZOJ":["zoj"],
"HDU":["hdu"],
"UVALive":["uvalive", "la"],
"UVA":["uva"],
"51Nod":["51nod"],
"HIT":["hit"],
"SPOJ":["spoj"],
"POJ":["poj"]
};
for(var o in t) {
for(var z in t[o]) {
var prefix = t[o][z];
if(k.indexOf(prefix)==0) {
window.location.href='/problem/'+o+'-'+k.slice(prefix.length).replace(/-/g,"").toUpperCase();
return;
}
}
}
alert("unknown");
}
}
$(".nav.navbar-nav").append('<li class="nav-item" style="padding: .25em 1em !important;"><input class="nav-item" style="border: none;height: 3em;"></li>');
if(window.location.href.indexOf("UVA-")>0) {
var k=window.location.href.substr(window.location.href.indexOf("UVA-")+4); $("#prob-operation>.container").append('<div class="row"><div class="col-xs-12"><a href="https://uva.onlinejudge.org/external/'+k.slice(0,-2)+'/'+k+'.pdf" target="_blank" class="btn btn-secondary">PDF</a></div></div>'); }
$("input.nav-item").keypress(function (e) {if (e.which == 13) {funcs()}});
})();
// ==UserScript==
// @name vjudge Timer
// @namespace none
// @version 1.0
// @description vjudge计时器
// @author sahdsg
// @match https://cn.vjudge.net/problem/*
// @match https://vjudge.net/problem/*
// @grant none
// ==/UserScript== (function(){
var odate = new Date();
var timeron = true; function getTime() {
var date = new Date()-odate;
var second = Math.floor(date/1000)%60;
if(second<10) {
second="0"+second;
}
var minute = Math.floor(date/60000)%60;
if(minute<10) {
minute="0"+minute;
}
var hour = Math.floor(date/3600000)%60;
if(hour<10) {
hour="0"+hour;
}
var str=hour+':'+minute+':'+second;
var mtimer = document.getElementById("timerid");
mtimer.innerHTML=str;
} function changeTimer() {
if(timeron) {
getTime();
clearInterval(terval);
timeron = false;
$("#timerop").html("continue");
$("#problem_discuss").slideDown();
} else {
getTime();
terval = setInterval(getTime,1000);
timeron=true;
$("#timerop").html("pause");
$("#problem_discuss").slideUp();
}
}
function resetTimer() {
odate = new Date();var mtimer = document.getElementById("timerid");mtimer.innerHTML='00:00:00';
}
$("#prob-left-panel").prepend('<div class="alert row alert-danger"><table width="100%"><tbody><tr><td>Time used:</td><td style="text-align: right" width="50%" id="timerid">00:00:00</td></tr><tr><td><button class="btn-danger" id="timereset">reset</button></td><td style="text-align: right"><button class="btn-danger" id="timerop">pause</button></td></tr></tbody></table></div>');
$("#timerop").click(function(){changeTimer();});$("#timereset").click(function(){resetTimer();});
var terval = setInterval(getTime,1000);
$("#problem_discuss").hide();
timeron=true;
})();

Vjudge Code的更多相关文章

  1. HDU 4813 Hard Code 水题

    Hard Code Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.act ...

  2. URAL 1780 G - Gray Code 找规律

    G - Gray CodeTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view ...

  3. 专题[vjudge] - 数论0.1

    专题[vjudge] - 数论0.1 web-address : https://cn.vjudge.net/contest/176171 A - Mathematically Hard 题意就是定义 ...

  4. (完全背包)Writing Code -- Codeforce 544C

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=99951#problem/C  (zznu14) Writing Code  Writin ...

  5. UVA 1593 Alignment of Code(紫书习题5-1 字符串流)

    You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is ...

  6. Visual Studio Code 代理设置

    Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器,在十多年的编程经历中,我使用过非常多的的代码编辑器(包括 IDE),例如 Fron ...

  7. 我们是怎么做Code Review的

    前几天看了<Code Review 程序员的寄望与哀伤>,想到我们团队开展Code Review也有2年了,结果还算比较满意,有些经验应该可以和大家一起分享.探讨.我们为什么要推行Code ...

  8. Code Review 程序员的寄望与哀伤

    一个程序员,他写完了代码,在测试环境通过了测试,然后他把它发布到了线上生产环境,但很快就发现在生产环境上出了问题,有潜在的 bug. 事后分析,是生产环境的一些微妙差异,使得这种 bug 场景在线下测 ...

  9. 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM

    刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...

随机推荐

  1. 值得一看的35个Redis常用问题总结

    1.什么是redis? Redis 是一个基于内存的高性能key-value数据库. 2.Reids的特点 Redis本质上是一个Key-Value类型的内存数据库,很像memcached,整个数据库 ...

  2. 深入解读MySQL8.0 新特性 :Crash Safe DDL

    前言 在MySQL8.0之前的版本中,由于架构的原因,mysql在server层使用统一的frm文件来存储表元数据信息,这个信息能够被不同的存储引擎识别.而实际上innodb本身也存储有元数据信息.这 ...

  3. 1.3创建项目「深入浅出ASP.NET Core系列」

    控制台创建项目 dotnet new --help 使用控制台采集项目,务必要熟练使用命令,--help是命令帮助的指明灯,在你无法google的时候,可以离线状态最快的帮助到你. 根据模板名称,我们 ...

  4. https浅析

    https浅析  http协议本身有着很大的缺陷  1. 通信使用明文,若被抓包,则直接被窃取信息  2. 不验证与自身通信者的身份,有可能遭到伪装  - 在数据传输的过程中,经过了某一计算机,该计算 ...

  5. 时间序列算法(平稳时间序列模型,AR(p),MA(q),ARMA(p,q)模型和非平稳时间序列模型,ARIMA(p,d,q)模型)的模型以及需要的概念基础学习笔记梳理

    在做很多与时间序列有关的预测时,比如股票预测,餐厅菜品销量预测时常常会用到时间序列算法,之前在学习这方面的知识时发现这方面的知识讲解不多,所以自己对时间序列算法中的常用概念和模型进行梳理总结(但是为了 ...

  6. 制作联动时,数据绑定combox控件会触发SelectedIndexChanged事件

    看过很多个网站的解决办法,基本雷同,还不能解决,真怀疑他们是互相直接炒的,没事通过验证. 在做省市区的三级联动时候出现这个问题,最后通过先设置值对象和显示对象,最后才绑定数据,这样一个逻辑操作,什么问 ...

  7. [TCP/IP] 网络层-抓包分析IP数据包首部

    ip数据包的结构:首部+数据部分 1.版本(v4或者v6)+首部长度(固定的20字节,所以就没有)+区分服务优先级(我的例子是 assured forwarding 31 0x1a 26,保证转发) ...

  8. 一个简易的Python爬虫,将爬取到的数据写入txt文档中

    代码如下: import requests import re import os #url url = "http://wiki.akbfun48.com/index.php?title= ...

  9. python3 爬取boss直聘职业分类数据(未完成)

    import reimport urllib.request # 爬取boss直聘职业分类数据def subRule(fileName): result = re.findall(r'<p cl ...

  10. DRDS分布式SQL引擎—执行计划介绍

    摘要: 本文着重介绍 DRDS 执行计划中各个操作符的含义,以便用户通过查询计划了解 SQL 执行流程,从而有针对性的调优 SQL. DRDS分布式SQL引擎 — 执行计划介绍 前言 数据库系统中,执 ...