zoukankan      html  css  js  c++  java
  • 某神奇的cf跳转插件

    鬼知道这东西竟然更新了。。。

    2020.1.27 增加gym支持,顺便删了codeforc.es

    2020.1.30 上次改锅了。。。修锅

    2020.3.20 又修了个锅

    // ==UserScript==
    // @name         Codeforces快速跳转菜单
    // @namespace    http://tampermonkey.net/
    // @version      2020.1.30
    // @author       xzz
    // @match        https://codeforces.com/problemset/problem/*/*
    // @match        https://codeforces.com/contest/*/problem/*
    // @match        https://codeforces.com/gym/*/problem/*
    // @match        https://codeforces.ml/problemset/problem/*/*
    // @match        https://codeforces.ml/contest/*/problem/*
    // @match        https://codeforces.ml/gym/*/problem/*
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
        document.contenthide=function(){
            if(document.getElementById("content").style.display=='none')document.getElementById("content").style.display='';
            else document.getElementById("content").style.display='none';
        }
        var ContID=window.location.pathname;
        var ProbID="";for(var i=ContID.length-1;ContID[i]!='/';--i)ProbID=ContID[i]+ProbID;
        var p=0;while(isNaN(ContID[p]))++p;
        var q=p;while(!isNaN(ContID[q]))++q;
        ContID=ContID.substring(p,q).toString();
        var src="https://"+window.location.host;
        if(window.location.pathname[1]!='g')src+="/contest/";
        else src+="/gym/";
        var content='';
        content+='<a href="'+src+ContID+'/standings/friends/true">Contest standings(friends only)</a>'+'<br/>';
        content+='<a href="'+src+ContID+'">Contest '+ContID+'</a>'+'<br/>';
        content+='<a href="'+src+'problemset/status?friends=on">Friends status</a>'+'<br/>';
        content+='<a href="'+src+ContID+'/status/'+ProbID+'">Problem status</a>'+'<br/>';
        content='<div id="content" style="background: white;padding:10px;">'+content+'</div>';// 目录的div
        content='<div style="330px;position: fixed;bottom: 0;height: min-content;right: 0;margin: 30px;padding: 10px;text-align:left;z-index:2147483647">'+content+'<button style="position: fixed" onclick="document.contenthide();">Show/Hide</button></div>'
        $("body").prepend(content);
    })();
    
  • 相关阅读:
    CentOS配置教程
    CentOS安装教程(VMware)
    Kali配置教程
    Kali安装教程(VMWare)
    Tomcat安装教程
    JDK安装教程(Windows7 x64)
    WebSphere概要文件的创建与删除
    swftools安装教程
    常用Linux源小记
    Linux软件源书写格式解析及本地yum源制作
  • 原文地址:https://www.cnblogs.com/xzz_233/p/11783168.html
Copyright © 2011-2022 走看看