Github Old Feed

Replace the shit💩 new feed with the old one.

ของเมื่อวันที่ 09-09-2023 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name         Github Old Feed
// @description  Replace the shit💩 new feed with the old one.
// @author       荣顶
// @version      1.4
// @license      MIT
// @homepage      https://github.com/wangrongding/github-old-feed.git
// @namespace    http://tampermonkey.net/
// @match        https://github.com/
// @match        https://github.com/dashboard
// ==/UserScript==

(function () {
  'use strict';

  const feedContent = document.querySelector('.feed-content')
  const feedMain = document.querySelector('.feed-main')
  const sidebar = document.querySelector('.feed-right-sidebar')

  feedContent.style.maxWidth = "unset"
  feedMain.style.maxWidth = "100%"
  sidebar.style.maxWidth = "unset"
  sidebar.style.width = "900px"

  fetch('https://github.com/dashboard-feed')
    .then(response => response.text())
    .then(text => {
      const parser = new DOMParser();
      const doc = parser.parseFromString(text, 'text/html');
      const dashboard = document.querySelector("#dashboard");
      const main = doc.querySelector('main');
      if (dashboard && main) dashboard.innerHTML = main.innerHTML;
    })
    .catch(error => {
      console.error('Fetching the dashboard feed:', error);
    });
})();