Skip to content

Instantly share code, notes, and snippets.

@pg07codes
Created June 28, 2020 02:59
Show Gist options
  • Save pg07codes/8e1be2d8d0bf6b8a65ac35c8602cf9c3 to your computer and use it in GitHub Desktop.
Save pg07codes/8e1be2d8d0bf6b8a65ac35c8602cf9c3 to your computer and use it in GitHub Desktop.
If you end up wasting time on scrolling through your github feed everytime , use and injector to inject this script.
function toggle() {
let news = document.querySelector(".news");
news = news.firstChild;
let newsStatus = document.querySelector(".news").style.visibility;
document.querySelector(".news").style.visibility = (newsStatus==="hidden") ? "visible" : "hidden"
}
function restyle(){
document.querySelector("aside[aria-label='Explore']").innerHTML="" // removed as i find it useless
document.querySelector(".news").style.visibility = "hidden"; // default is hidden
let dashboard = document.querySelector(".dashboard");
let customBox = document.createElement('div');
customBox.innerHTML = " <h1>better start working. scrolling is an addiction.</h1><a href='https://github.com/pg07codes?tab=repositories'>Repos</a><br><a href='https://github.com/pg07codes?tab=stars'>Starred Repos</a><br><a href='https://github.com/pg07codes'>Profile</a ><br><button>TOGGLE FEED SHOW</button> "
customBox.querySelector('button').addEventListener('click',toggle);
customBox.style.margin = "auto";
customBox.style.width = "400px";
customBox.style.textAlign = "center";
dashboard.insertBefore(customBox, dashboard.firstChild);
}
restyle();
@pg07codes
Copy link
Author

pg07codes commented Jun 28, 2020

Just use a browser js injector to execute this script .

This is how it looks after executing.

PS: do not forget to change the links for profile, repos,starred repos for your account . they are hardcoded for my personal github

ghub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment