折叠greasyfork过期讨论

作者主页只显示30天内的评论

  1. // ==UserScript==
  2. // @name 折叠greasyfork过期讨论
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description 作者主页只显示30天内的评论
  6. // @author kakasearch
  7. // @match https://gf.qytechs.cn/*/users*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. let items = document.querySelectorAll("#user-discussions-on-scripts-written > section > div")
  14. let now = new Date()
  15. let num = 0
  16. for(let item of items){
  17. let item_time = item.querySelector('relative-time').date
  18. if(now - new Date(item_time)>24*3600*1000*30){
  19. item.style.display="none"
  20. num += 1
  21. }
  22. }
  23.  
  24. })();

QingJ © 2025

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