Created
September 11, 2023 14:45
-
-
Save gquittet/3bfa07e45713393e245e82e53d453aa1 to your computer and use it in GitHub Desktop.
Back to the good old feed. Source: https://greasyfork.org/en/scripts/474728-github-old-feed/code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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'); | |
// Preserving the SSO container | |
const dashboard = document.querySelector("#dashboard feed-container"); | |
const main = doc.querySelector('main'); | |
if (dashboard && main) dashboard.replaceWith(main); | |
}) | |
.catch(error => { | |
console.error('Fetching the dashboard feed:', error); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment