加一些代码,让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. 多线程协作wait、notify、notifyAll方法简介理解使用 多线程中篇(十四)

    在锁与监视器中有对wait和notify以及notifyAll进行了简单介绍 所有对象都有一个与之关联的锁与监视器 wait和notify以及notifyAll之所以是Object的方法就是因为任何一 ...

  2. 第一册:lesson 113.

    原文:Small changes. question:Who has got some small changes? Fares,please! Trafalgar Square,please. I' ...

  3. 通用mapper认识和用法

    目录 0. 认识 1. 导包 2. mybatis的config文件:mybatis-mapper-config.xml 3. spring与mybatis整合配置文件:mybatis.xml 4. ...

  4. 2018-07-10 为Chrome和火狐浏览器编写扩展

    由于扩展标准的逐渐一致, 现在同一扩展代码库已经有可能同时用于Chrome和火狐. 下面是一个简单的工具栏按钮和弹窗(尚无任何实际功能): 代码库地址: nobodxbodon/suan1 所有代码: ...

  5. Web前端2019面试总结

    基础知识点   1.水平垂直居中 子绝父相,子盒子设置绝对定位,设置top:50%;left:50%,margin-top:-50%;margin-left:-50%; 子绝父相,子盒子设置绝对定位, ...

  6. solr8.0 从数据库导入数据(三)

    第一步:导入相关包: 在创建的核心目录下新建lib文件夹(如果有,无需建立),从Solr源码包的dist文件夹中导入两个solr-dataimporthandler包,以及一个mysql驱动包. 第二 ...

  7. Webpack 4教程:为什么要优化代码

    转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具.解决方案和服务,赋能开发者.原文出处:https://wanago.io/2018/07/30/webpack-4-course-part ...

  8. Openlayer 3加载本地ArcGIS切片

    第一篇博客,简单的开个头吧.希望自己能坚持记录.一般什么情况什么人需要这样的需求呢,伐木的光头强大哥说我们在深山老林里,没网的啊,地图就手机本地duang的加载一下吧.那么Server啊就要丢掉丢掉. ...

  9. jmeter接口测试实战-创建用户

    jmeter接口测试实战-创建用户 相信大多数看到标题的同学都会有疑问, 创建用户不是很简单吗, 调用一下创建用户接口, 传入指定入参, 用户即可创建成功, 今天我们的实战来讲讲创建场景.通过接口创建 ...

  10. 什么是validationQuery

    validationQuery是用来验证数据库连接的查询语句,这个查询语句必须是至少返回一条数据的SELECT语句.每种数据库都有各自的验证语句,下表中收集了几种常见数据库的validationQue ...