跳到正文

科技·工程

Better Luogu! | 史上最唐洛谷脚本

volatile约 11 分钟
原文

这是 2025年11月27日 存档的第 1 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年1月13日
篇幅
约 11 分钟

版本

  1. v4当前
  2. v3
  3. v2
  4. v1

只要 Better Luogu! 一更新,我就会多很多私信。

——@volatile

彳亍口巴。

投票:是否移除“千万别点”(点击选项进行投票):
赶紧移除
我就爱用

顺便一提,

他说对了。\color{gray}\small他说对了。

“千万别点”这个司马东西的出现应该和这个有关。

@SqrtSecond

已加载全部消息\color{gray}\small已加载全部消息

2023−07−19 16:50\small2023-07-19\ 16:50

当然想试试的已经试不了了,因为原云剪贴板删了。

起源

原来已经快两年了。感觉这两年啥也没干。感觉这两年就干了一件事。

两年过去码量膨胀了 2020 倍,然后越来越没意思了。

笑点是第一版的所有功能都没了。

只记得寒假吃饱了撑着的写了几行,本来啥也不会的,要么抄要么度娘。

所以和我一起来锐评一下 v1.0.0

见星号。

JavaScript
 // ==UserScript==
// @name         new luogu
// @namespace    http://tampermonkey.net/
// @version      1.0.0
// @description  洛谷扩展
// @author       volatile
// @match        https://*.luogu.com.cn/*
// @match        https://*.luogu.org/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=luogu.com.cn
// @grant        GM_addStyle
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        GM_listValues
// @grant        GM_setClipboard
// @grant        GM_xmlhttpRequest
// @grant        GM_getResourceText *全没用到
// @grant        unsafeWindow
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    //进入插件 *幽默注释
    console.log("This is new luogu");*幽默

    //日历 *幽默注释
    const today=new Date();
    const year=today.getFullYear();
    const month=String(today.getMonth()+1);
    const day=String(today.getDate());
    console.log(year);*幽默
    console.log(month);*幽默
    console.log(day);*幽默
    var date_html=`<h2>今天是 `+year+`-`+month+`-`+day+`</h2>`;
    if(month==1&&day==1){
        date_html+=`<h2>今天是元旦,新的一年,新的开始</h2>`;
    }
    else if(month==2&&day==29){
        date_html+=`<h2>今年是闰年</h2>`;
    }
    else if(month==4&&day==1){
        date_html+=`<h2>今天是愚人节</h2>`;
    }
    else if(month==5&&day==1){
        date_html+=`<h2>今天是劳动节</h2>`;
    }
    else if(month==6&&day==1){
        date_html+=`<h2>今天是儿童节</h2>`;
    }
    else if(month==9&&day==10){
        date_html+=`<h2>今天是教师节</h2>`;
    }
    else if(month==10&&day==1){
        date_html+=`<h2>今天是国庆节,七天小长假,启动!</h2>`
    }
    else if(month==12&&day==31){
        date_html+=`<h2>明年见</h2>`;
    }
    else if(month==4&&day==28){
        var years=year-YEAR;*涉及年龄遂替换
        date_html+=`<h2>今天是作者生日的后 `+years+` 年</h2>`;
    }
    else{
        date_html+=`<h2>欢迎!</h2>`;
    }
    var date=document.createElement('div');
    date.className='lg-article';
    date.innerHTML=date_html;
    document.querySelector('div.lg-right > div:nth-child(1)').insertAdjacentElement('beforebegin', date);

    //更改用户名颜色 *幽默注释
    var color=document.getElementsByClassName("lg-fg-green")[0];*手动这一块
    console.log(color);*幽默
    color.className="lg-fg-purple";*手动这一块

    //介绍 *幽默注释
    var x=[{link:'https://github.com/USER/new-luogu',text:'NEWLG'},];*涉及姓名遂替换
    function add()
    {
        if(document.querySelectorAll('.link-container')[0]==undefined){
            setTimeout(function(){add()},50);
        }
        else{
            setTimeout(function(){for(var i in x){
                var a=document.createElement("a");document.querySelectorAll('.link-container')[0].append(a);
                a.outerHTML=
                '<a href=\"'+x[i].link+'\" target=\"_blank\" colorscheme=\"none\" class=\"header-link color-none\" style="vertical-align: middle;margin-right: 2em;color: #262626;text-decoration: none;">'+x[i].text+'</a>'
            ;}},100);
        }
    }
    add();*省流:抄的
    // Your code here... *幽默注释
})();

功能

  • 用户名自定义
  • 日历
  • 智能推荐显示热搜(废物利用这一块)
  • 查看他人主页 请期待 v1.13.3
  • 快捷搜索引擎
  • 私信快捷操作
    • 清空私信
    • 拉黑 请期待 v1.13.3
  • 在保存站打开帖子 猜猜为什么没用了
  • 【数据删除】的千万别点
  • 比赛题目返回题目列表
  • 隐藏广告
  • 题目 IDE 缺省源
  • Markdown 工具栏补充
  • 专栏评论管理
  • 公告板 请期待 v1.13.3

评价

截止到 2025.11.26,Better Luogu! 用户高频使用功能如下。

功能比例
题目ide缺省源38.64%
私信清空34.09%
比赛列表返回29.55%
快捷工具栏45.45%
炸作者私信38.64%
其他4.55%

用户给出高度评价。

不要瞎恶搞!!!搞得我以为得罪了一个红名大佬。

——@cwxcplh

能不能炸我私信

——@LINYUHENG2

学术点,里面的娱乐功能太恶心人? (其实没建议,看着不快直接搬了)


多一点私信轰炸

——@Red_river

建议1:太花了 建议2:作者真(tai)棒(™)呀(qie’le) 建议作者看好木琴和抚琴

——@kkksc03

他 uid 就是这么填的。↑


建议 better luogu 广泛征求建议

——@volatile

他 uid 就是这么填的。↑

下载