Mastodon Trending posts 辅助脚本

在待审查流行嘟文条目下标注该用户注册(不可用)时间、嘟文数、正在关注数、关注者数

  1. // ==UserScript==
  2. // @name Mastodon Trending posts 辅助脚本
  3. // @namespace https://blog.bgme.me/
  4. // @icon https://bgme.me/favicon.ico
  5. // @match https://bgme.me/admin/trends/statuses
  6. // @match https://bgme.bid/admin/trends/statuses
  7. // @grant GM_xmlhttpRequest
  8. // @version 1.0
  9. // @author bgme
  10. // @description 在待审查流行嘟文条目下标注该用户注册(不可用)时间、嘟文数、正在关注数、关注者数
  11. // @inject-into content
  12. // @license AGPL-3.0-or-later
  13. // ==/UserScript==
  14.  
  15. Array.from(document.querySelectorAll('.batch-table__row--attention .pending-account__header a.name-tag')).map((a) => {
  16. const id = a.href.split('/').slice(-1)[0];
  17. const account__header = a.parentElement.parentElement;
  18.  
  19. GM_xmlhttpRequest({
  20. url: `${document.location.origin}/api/v1/accounts/${id}`,
  21. responseType: 'json',
  22. onload: (raw) => {
  23. const data = raw.response;
  24. const detail = `${data.created_at.split('T')[0]} ${data.statuses_count} Posts ${data.following_count} Following ${data.followers_count} Followers`;
  25. account__header.appendChild(document.createElement('br'));
  26. account__header.appendChild(document.createTextNode(detail));
  27. }
  28. })
  29. })

QingJ © 2025

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