Github Old Feed

Replace the shit💩 new feed with the old one.

  1. // ==UserScript==
  2. // @name Github Old Feed
  3. // @description Replace the shit💩 new feed with the old one.
  4. // @author 荣顶
  5. // @version 1.6
  6. // @license MIT
  7. // @homepage https://github.com/wangrongding/github-old-feed.git
  8. // @namespace http://tampermonkey.net/
  9. // @match https://github.com/
  10. // @match https://github.com/dashboard
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15.  
  16. const feedContent = document.querySelector('.feed-content')
  17. const feedMain = document.querySelector('.feed-main')
  18. const sidebar = document.querySelector('.feed-right-sidebar')
  19. if (feedContent) feedContent.style.maxWidth = "unset"
  20. if (feedMain) feedMain.style.maxWidth = "100%"
  21. if (sidebar) {
  22. sidebar.style.maxWidth = "unset"
  23. sidebar.style.width = "900px"
  24. }
  25.  
  26. fetch('https://github.com/dashboard-feed')
  27. .then(response => response.text())
  28. .then(text => {
  29. const parser = new DOMParser();
  30. const doc = parser.parseFromString(text, 'text/html');
  31. // Preserving the SSO container
  32. const dashboard = document.querySelector("#dashboard feed-container");
  33. const main = doc.querySelector('main');
  34. if (dashboard && main) dashboard.replaceWith(main);
  35. })
  36. .catch(error => {
  37. console.error('Fetching the dashboard feed:', error);
  38. });
  39. })();

QingJ © 2025

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