Vjudge背景替换

将Vjudge的背景图片更改为必应的每日一图

目前为 2025-01-19 提交的版本。查看 最新版本

// ==UserScript==
// @name         Vjudge背景替换
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  将Vjudge的背景图片更改为必应的每日一图
// @author       LLDQ
// @match        https://vjudge.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 设置背景图片的URL
    const backgroundImageUrl = 'https://bing.img.run/uhd.php';

    // 创建一个样式元素
    const style = document.createElement('style');
    style.type = 'text/css';

    // 设置背景图片样式
    style.innerHTML = `
        body {
            background-image: url('${backgroundImageUrl}') !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
    `;

    // 将样式元素添加到文档的head中
    document.head.appendChild(style);
})();