修改页面元素时间

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

  1. // ==UserScript==
  2. // @name 修改页面元素时间
  3. // @namespace your-namespace
  4. // @version 1.1
  5. // @description 修改页面元素中的时间内容
  6. // @match https://mp.weixin.qq.com/*
  7. // @grant none
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // 指定链接和对应的时间
  15. var linkTimeMap = {
  16. "https://mp.weixin.qq.com/s/AAA": "2023-09-01 18:00",
  17. "https://mp.weixin.qq.com/s/CCC": "2023-08-15 13:00"
  18. };
  19.  
  20. // 获取当前链接
  21. var currentLink = window.location.href;
  22.  
  23. // 检查当前链接是否在指定的链接和时间映射中
  24. if (currentLink in linkTimeMap) {
  25. // 获取要修改的元素
  26. var element = document.getElementById("publish_time");
  27. if (element) {
  28. // 修改元素的内容为指定的时间
  29. element.textContent = linkTimeMap[currentLink];
  30. }
  31. }
  32. })();

QingJ © 2025

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