修改页面元素时间

修改页面元素中的时间内容

// ==UserScript==
// @name         修改页面元素时间
// @namespace    your-namespace
// @version      1.1
// @description  修改页面元素中的时间内容
// @match        https://mp.weixin.qq.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 指定链接和对应的时间
    var linkTimeMap = {
        "https://mp.weixin.qq.com/s/AAA": "2023-09-01 18:00",
        "https://mp.weixin.qq.com/s/CCC": "2023-08-15 13:00"
    };

    // 获取当前链接
    var currentLink = window.location.href;

    // 检查当前链接是否在指定的链接和时间映射中
    if (currentLink in linkTimeMap) {
        // 获取要修改的元素
        var element = document.getElementById("publish_time");
        if (element) {
            // 修改元素的内容为指定的时间
            element.textContent = linkTimeMap[currentLink];
        }
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址