加一些代码,让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. Mac下安装多版本python

    1.安装Homebrew 将命令行复制至终端,进行安装. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/H ...

  2. 第一册:lesson 115.

    原文:Knock,Knock! question:What does Jim have to drink? Isn't there anyone at home? I'll knock again , ...

  3. 在线生成二维码的API接口

    现在很多大网站都有这样的一个功能,使用手机扫描一下网页上的二维码便可快速在手机上访问网站.想要实现这样的功能其实很简单,下面麦布分享几个在线生成网址二维码的API接口.都是采用http协议接口,无需下 ...

  4. C# winForm 窗口跳转后关闭上一个窗口的方法

    FrmMain main = new FrmMain(); main.Owner = this; this.Hide(); main.ShowDialog(); Application.ExitThr ...

  5. SpringBoot2 application.properties方式加载配置文件

    application.properties jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://127.0.0.1:33 ...

  6. 根据URL获取图片

    背景:今天因为生产环境的系统界面图片无法显示被领导叼了一波,之前用Hutool工具类解析URL获取图片的,在生产环境上跑了一个多月都正常,嘣,今天突然发现周六下午后的图片统统显示异常,之后改为用jav ...

  7. SpringIOC/DI(2)

    2019-03-08/09:24:37 开发环境:IDEA 1.创建Spring项目 File--New--project--Spring--Creat empty Spring-config.xml ...

  8. 《JavaScript高级程序设计》笔记:BOM(八)

    BOM(浏览器对象模型)提供了很多对象,用于访问浏览器的功能,这些功能与任何网页内容无关. window对象 全局作用域 定义全局变量与在window对象上直接定义属性还是有一点差别:全局变量不能通过 ...

  9. ElasticSearch-6.3.2 linux 安装

    在linux 系统安装ElasticSearch-6.3.2最新版本,也适合6.x 系列版本做参考 前提先在linux 安装好jdk1.8 创建用户 从5.0开始,ElasticSearch 安全级别 ...

  10. Node.js安装及环境配置之Windows篇---完美,win7已测

    一.安装环境 1.本机系统:Windows 10 Pro(64位) (楼主win7,完美通过)2.Node.js:v6.9.2LTS(64位) (楼主版本2018-11-01下载的最新版本) 二.安装 ...