Skip to content

Instantly share code, notes, and snippets.

@Cobertos
Created January 11, 2021 14:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cobertos/aa8f36debf737c76ec24da77dc07b4cc to your computer and use it in GitHub Desktop.
Save Cobertos/aa8f36debf737c76ec24da77dc07b4cc to your computer and use it in GitHub Desktop.
GitHub Only Readme
// ==UserScript==
// @name GitHub Only Readme
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Replace the contents of a GitHub page with just the contents of the README (for a dashboard uwu)
// @author You
// @match https://github.com/Cobertos/Cobertos/blob/master/README.md
// @grant none
// ==/UserScript==
function documentOnlyReadme() {
console.log("Remove that element!");
const r = document.getElementById('readme');
document.replaceChild(r, document.documentElement);
}
(function() {
'use strict';
if (document.readyState == "complete" || document.readyState == "loaded" || document.readyState == "interactive") {
console.log("Already Loaded");
documentOnlyReadme();
} else {
document.addEventListener("DOMContentLoaded", function(event) {
console.log("Just Loaded");
documentOnlyReadme();
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment