Skip to content

Instantly share code, notes, and snippets.

@Koopzington
Last active September 5, 2018 12:05
Show Gist options
  • Save Koopzington/8c374786511a37ebfac47cfd2db958c6 to your computer and use it in GitHub Desktop.
Save Koopzington/8c374786511a37ebfac47cfd2db958c6 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Github - Show all files
// @namespace https://github.com/Koopzington
// @version 0.1
// @description Shows all files by default
// @author koopzington@gmail.com
// @match https://github.com/*
// @downloadURL https://gist.github.com/Koopzington/8c374786511a37ebfac47cfd2db958c6/raw/github-show-all-files.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Also execute this script if content is getting loaded via pjax
document.addEventListener("pjax:complete", function () {
showAllFiles();
});
showAllFiles();
function showAllFiles() {
let btn = document.querySelector('.btn-truncate-file-list')
if (btn) {
btn.click();
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment