删除 lxl 题目里面的图
  • 板块灌水区
  • 楼主CuteMurasame
  • 当前回复11
  • 已保存回复13
  • 发布时间2024/8/13 14:37
  • 上次更新2024/8/13 16:27:17
查看原帖
删除 lxl 题目里面的图
682739
CuteMurasame楼主2024/8/13 14:37

众所周知有五彩斑斓的图很影响我们的思考,还容易在机房被误认为摸鱼(比如 @danwei1 就被误解过)。

这里点名表扬,lxl 的题,全是五彩斑斓的图,所以糊了个脚本,删图(当然你要自己加 lxl 的题目编号)

// ==UserScript==
// @name         删除 lxl 的图
// @namespace    http://tampermonkey.net/
// @version      remove_pics_from_anime_and_galgame
// @description  删除 lxl 题目中的图
// @author       Your Name
// @match        https://www.luogu.com.cn/problem/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const lxl_problems = ['P3792', '自己添加', '自己添加'];
    const currentProblem = window.location.pathname.split('/').pop();
    if (lxl_problems.includes(currentProblem)) {
        setInterval(() => {
            const images = document.querySelectorAll('div.card.problem-card.padding-default img');
            images.forEach(img => {
                img.style.display = 'none';
            });
        }, 100);
    }
})();
2024/8/13 14:37
加载中...