插件 & 主题

· · 科技·工程

一些好用的落咕插件

许多内容来源于网络,侵删。

exlg 倒了,官网死了(可能是没续费),有一些插件要更新。

前置:油猴、Stylus安装

安装指导

  1. 什么是油猴插件(来源网络)

Tampermonkey(油猴),是一款基于浏览器的扩展插件,经过全球各地无数开发者数年的积累,目前已经拥有大量现成优秀脚本,让浏览器实现了一些软件都做不到的逆天功能。

  1. Stylus

Stylus是一种创新的样式表语言,可编译为CSS。Stylus受到SASS的启发,使用node.js构建,能够在浏览器中运行,如本交互式教程所示。一些插件式主题需要安装Stylus.

插件:下完油猴才能安装,点了链接会被油猴自动打开

1. exlg

好多实用小功能!强烈推荐!!!下了就知道有多牛了

下载链接:安装exlg 官方文档1 官方文档2,装好滑到页面顶图标上单击设置

花5元可以搞个tag(只用装了exlg才看得到)。

2. oiso++

好多实用小功能!+1 搜帖子神器

下载链接:安装oiso++,装好滑到页面顶图标上单击设置

3. Luogu Search AnyWhere

luogu5.0官方在愚人节玩笑中退出的搜人、搜题工具,这是真实的!

下载连接:安装Luogu Search AnyWhere,进链接点击安装,装好就可以在右下角找到搜索图标。

4. Luogu Task

小工具,针对提单的优化,挺方便内卷的

下载连接:安装Luogu Task,进链接点击安装

5. 洛谷自动签到

下载连接:安装洛谷自动签到,进链接点击安装

6. 洛谷通过题目比较器

卷王专属,看看跟别人有多少差距

下载链接:安装洛谷通过题目比较器,进链接点击安装

7. 获取洛谷部分页面源代码

下载链接:link

8. 洛谷显示他人咕值

下载链接:安装洛谷显示他人咕值,进链接点击安装

9. 卷王监视器

代码复制到油猴,记得修改监视名单 :::info[code]

// ==UserScript==
// @name         m
// @namespace    https://www.luogu.com.cn/m
// @description  try to take over the world!
// @match        https://www.luogu.com.cn/m
// @require      https://unpkg.com/sweetalert2/dist/sweetalert2.all.min.js
// ==/UserScript==
var team =["fzh3876","syh110213","chenbs","hzh17","cbh_bbh","OvO_CYX","Hcy114514","wsdyz2010","__pyx__","cyThing","Anthony2011sfh"];
var userlist = team;
var First = 1;
var cnt = 0;
var lst;
var pages = 1;<!-- 初始检查做题记录页数,建议设置为 1-2 -->
var cd = 10000; <!-- 自动检查每个人时间间隔,建议保持为 10000,以免 GG-->
var str,id;
var colors=['rgb(191, 191, 191)','rgb(254, 76, 97)','rgb(243, 156, 17)','rgb(255, 193, 22)','rgb(82, 196, 26)','rgb(52, 152, 219)','rgb(157, 61, 207)','rgb(14, 29, 105)'];
var name="灰红橙黄绿蓝紫黑";
var res = "";
async function PARSE()
{
    document.title = "getting";
    if(First && cnt == userlist.length - 1){ First = 0;cnt = 0;clearInterval(id);setInterval(await PARSE(),cd)
}
    cnt=(cnt+1)%userlist.length;
    var user=userlist[cnt];
    var Pagenum=1;if(First)Pagenum=pages;
    for(;Pagenum>0;Pagenum--)
    {
        var httpRequest=new XMLHttpRequest();
        httpRequest.open('GET','https://www.luogu.com.cn/record/list?user='+user+'&status=12&page='+Pagenum,false);
        await httpRequest.send();
        if(httpRequest.readyState==4&&httpRequest.status==200)
        {
            var content=httpRequest.responseText;
            var patten=/decodeURIComponent\(".*?"\)/;
            content=patten.exec(content)[0];
            content=content.substr(20,content.length-22);
            content=JSON.parse(decodeURIComponent(content));
            var prob,col,pid,title,rid;
            for(var i=Math.min(content.currentData.records.result.length-1,19);i>=0;i--)
                if(content.currentData.records.result[i].status==12&&content.currentData.records.result[i].id>lst[cnt])
                {
                    prob=content.currentData.records.result[i].problem;
                    rid = content.currentData.records.result[i].id;
                    col=colors[prob.difficulty];
                    pid=prob.pid;
                    title=prob.title;
                    document.getElementById('store').childNodes[0].innerHTML
                        +='<tr><td>'+user+'</td><td>'+pid+'</td><td>'+
                        "<a style='color:"+col+"' href='https://www.luogu.com.cn/problem/"+pid+"' target='_blank'>"
                        +title+"</a></td><td>"+
                        "<a style='color:"+col+"' href='https://www.luogu.com.cn/record/"+rid+"' target='_blank'>link</a></td></tr>";
                    if(!First)
                    {
                        res += user+" 刚刚卷了"+name[prob.difficulty]+"题 "+pid+" "+title+"\n\n";
                        if(res!= ""){
                            Swal.fire({
                                title: "Get result",
                                text: res,
                                icon: "success",
                                confirmButtonColor: "#3498db",
                                confirmButtonText: "关闭"
                            }).then((result) => {if (result.isConfirmed){ res = "";}});
                        }
                    }
                    lst[cnt]=content.currentData.records.result[i].id;
                }
        }
    }
    document.title = "ok";
}
function onSearch(obj)
{
    var storeId=document.getElementById('store');
    var rowsLength=storeId.rows.length;
    var key=document.getElementById('key').value;
    for(var i=1;i < rowsLength;i++)
    {
        var searchText=storeId.rows[i].cells[0].innerHTML;
        if(key=="*"||searchText.match(key))
            storeId.rows[i].style.display='';
        else
            storeId.rows[i].style.display='none';
    }
};
(async function() {
    'use strict';
    <!-- 观察成员列表 -->
    str='<div><select onchange="onSearch()" name="key" id="key"><option value="*">*</option>';
    for(var i=0;i < userlist.length;i++)
        str+='<option value="'+userlist[i]+'">'+userlist[i]+'</option>';
    str+='</select></div><table id="store" style="white-space: nowrap;"><tr><th>用户</th><th>题号</th><th>标题</th><th>记录</th></tr></table>';
    document.body.innerHTML = str;
    document.title = "m";
    lst = Array();
    for(i=0;i < userlist.length;i++)lst[i]=0;
    //for(i=0;i < userlist.length;i++) await PARSE(true);
    id = setInterval(await PARSE,1000);
})();

:::

10. 洛谷主页显示

link

11. 洛谷“问题跳转”样式优化

link

12.洛谷讨论区显示时间改成具体时间

@cff_0102 的杰作。 link

13. luogu usercard

link

14. 洛谷新前端左侧导航栏自定义

link

主题:装完Stylus再安装!

更多的去 userstyles 上找。

1. Simple - Luogu和Smart - Luogu

点击install安装

Simple-luogu

Smart-luogu

氩洛谷

由于userstyles.org进不去,因此推荐手动安装

进入链接->,源码

打开Stylus, 勾起新建样式后的UserCSS,然后新建,输入源码保存

配置:

按上面指导配置就好了