Last active
November 16, 2024 19:24
-
-
Save marcjulianschwarz/c20682f14fe31d0598f9ae535715c06f to your computer and use it in GitHub Desktop.
Bring back the old GitHub dashboard with PageExtender for Safari
This file contains hidden or 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
if (window.location.hostname === "github.com") { | |
const feedContent = document.querySelector('.feed-content') | |
if (feedContent){ | |
const feedMain = document.querySelector('.feed-main') | |
feedContent.style.maxWidth = "unset" | |
feedMain.style.maxWidth = "1200px" | |
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); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your PageExtender js file to enjoy the old (and better) GitHub dashboard.