Skip to content

Instantly share code, notes, and snippets.

@MrCyjaneK
Created April 22, 2024 07:56
Show Gist options
  • Save MrCyjaneK/fa009c593f627e2a809f9a71b7aef7bc to your computer and use it in GitHub Desktop.
Save MrCyjaneK/fa009c593f627e2a809f9a71b7aef7bc to your computer and use it in GitHub Desktop.
GitHub load all diffs
// ==UserScript==
// @name Load all diffs
// @namespace http://tampermonkey.net/
// @version 2024-04-22
// @description try to take over the world!
// @author Czarek Nakamoto <cyjan@mrcyjanek.net>
// @match https://github.com/*/files
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener("load", (event) => {
let elms = document.getElementsByClassName("text-bold f4 js-button-text")
for (let i = 0; i < elms.length; i++) {
if (elms[i].innerText = "Load diff") {
elms[i].parentElement.parentElement.parentElement.click();
}
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment