Greasy Fork镜像 还支持 简体中文。

Greasyfork Highlight Unupdated Scripts

Greasyfork shows the background of outdated scripts in light red to make it easier to identify these outdated scripts.

目前為 2025-06-04 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Greasyfork Highlight Unupdated Scripts
  3. // @name:zh-CN Greasyfork 未更新脚本高亮
  4. // @description Greasyfork shows the background of outdated scripts in light red to make it easier to identify these outdated scripts.
  5. // @description:zh-CN Greasyfork 未更新的脚本背景显示为浅红色,方便识别这些未更新脚本
  6. // @author AN drew,人民的勤务员 <china.qinwuyuan@gmail.com>
  7. // @namespace https://github.com/ChinaGodMan/UserScripts
  8. // @supportURL https://github.com/ChinaGodMan/UserScripts/issues
  9. // @homepage https://github.com/ChinaGodMan/UserScripts
  10. // @homepageURL https://github.com/ChinaGodMan/UserScripts
  11. // @license MIT
  12. // @match https://gf.qytechs.cn/*/users/*
  13. // @match https://gf.qytechs.cn/*/scripts*
  14. // @icon https://raw.githubusercontent.com/ChinaGodMan/UserScriptsHistory/main/scriptsIcon/greasyfork-utility-toolkit.svg
  15. // @compatible chrome
  16. // @compatible firefox
  17. // @compatible edge
  18. // @compatible opera
  19. // @compatible safari
  20. // @compatible kiwi
  21. // @compatible qq
  22. // @compatible via
  23. // @compatible brave
  24. // @version 2025.6.4.1
  25. // @grant GM_setValue
  26. // @grant GM_getValue
  27. // @grant GM_registerMenuCommand
  28. // ==/UserScript==
  29.  
  30. const Days = GM_getValue('days', 30) // 默认30天
  31. const threshold = Days * 24 * 60 * 60 * 1000
  32. GM_registerMenuCommand('Settings', () => {
  33. const userInput = prompt('Enter the number of days:', Days)
  34. if (userInput !== null) {
  35. const parsedInput = parseInt(userInput, 10)
  36. if (!isNaN(parsedInput) && parsedInput > 0) {
  37. GM_setValue('days', parsedInput)
  38. } else {
  39. alert('Invalid input. Please enter a positive number.')
  40. }
  41. }
  42. })
  43. document.querySelectorAll('dd.script-list-updated-date').forEach(function (dd) {
  44. const relativeTime = dd.querySelector('relative-time')
  45. if (relativeTime) {
  46. const time1 = new Date(relativeTime.getAttribute('datetime'))
  47. const time2 = new Date()
  48. if (time2.getTime() - time1.getTime() > threshold) {
  49. relativeTime.style.color = 'red'
  50. dd.closest('li').style.background = '#ff000008'
  51. }
  52. }
  53. })

QingJ © 2025

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