GitHub Feed Back

Bring my GitHub feed back

目前為 2023-09-07 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name GitHub Feed Back
  3. // @namespace https://github.com/Sec-ant
  4. // @version 0.0.5
  5. // @author Ze-Zheng Wu
  6. // @description Bring my GitHub feed back
  7. // @license MIT
  8. // @icon https://github.githubassets.com/favicons/favicon.svg
  9. // @homepage https://github.com/Sec-ant/github-feed-back
  10. // @homepageURL https://github.com/Sec-ant/github-feed-back
  11. // @source https://github.com/Sec-ant/github-feed-back
  12. // @supportURL https://github.com/Sec-ant/github-feed-back/issues
  13. // @match https://github.com/
  14. // @match https://github.com/?*
  15. // @match https://github.com/dashboard*
  16. // @run-at document-start
  17. // ==/UserScript==
  18.  
  19. (function () {
  20. 'use strict';
  21.  
  22. let found = 0;
  23. const observer = new MutationObserver((_, observer2) => {
  24. const includeFragment = document.querySelector(
  25. '[data-target="feed-container.content"] > include-fragment'
  26. );
  27. if (includeFragment) {
  28. includeFragment.src = "/dashboard-feed";
  29. ++found;
  30. }
  31. const filterButton = document.querySelector(
  32. '[data-target="feed-container.feedTitle"] + div'
  33. );
  34. if (filterButton) {
  35. filterButton.remove();
  36. ++found;
  37. }
  38. if (found > 1) {
  39. observer2.disconnect();
  40. }
  41. });
  42. observer.observe(document.documentElement, {
  43. childList: true,
  44. subtree: true
  45. });
  46. document.addEventListener("DOMContentLoaded", () => {
  47. observer.disconnect();
  48. });
  49.  
  50. })();

QingJ © 2025

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