PTH Posts

Show a Posts link that takes you to your grouped post history

  1. // ==UserScript==
  2. // @name PTH Posts
  3. // @version 0.3
  4. // @description Show a Posts link that takes you to your grouped post history
  5. // @author Chameleon
  6. // @include http*://redacted.ch/*
  7. // @grant none
  8. // @namespace https://gf.qytechs.cn/users/87476
  9. // ==/UserScript==
  10. var userid=document.getElementById('nav_userinfo').getElementsByTagName('a')[0].href.split('?id=')[1];
  11.  
  12. var links =
  13. [['Posts', '/userhistory.php?action=posts&userid='+userid],
  14. //['Comments-II', '/comments.php?action=torrents&type=uploaded'],
  15. ];
  16.  
  17. (function() {
  18. 'use strict';
  19. for(var i=0; i<links.length; i++)
  20. {
  21. var l=links[i];
  22. addHeaderLink(l[0], l[1]);
  23. }
  24. })();
  25.  
  26. function addHeaderLink(text, link)
  27. {
  28. var a=document.createElement('a');
  29. a.href=link;
  30. a.innerHTML = text;
  31. var li=document.createElement('li');
  32. li.appendChild(a);
  33. li.setAttribute('id', 'nav_posts');
  34. var before=document.getElementById('nav_comments');
  35. before.parentNode.insertBefore(li, before);
  36. }

QingJ © 2025

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