Skip to content

Instantly share code, notes, and snippets.

@Jodaille
Last active August 26, 2022 10:30
Show Gist options
  • Save Jodaille/17a7cc2d056a4afd33d54f9fdbd82695 to your computer and use it in GitHub Desktop.
Save Jodaille/17a7cc2d056a4afd33d54f9fdbd82695 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name GithubDiffStyle
// @version 1
// @grant none
// @match https://github.com/*/*/commit*
// @run-at document-idle
// ==/UserScript==
document.querySelectorAll('.blob-num').forEach(
function(blob) {
blob.style.minWidth = '1px';
blob.style.paddingRight = '1px';
var span = blob.parentElement.querySelector('.blob-code-inner');
if (span) {
// two spaces to one space
span.textContent = span.textContent.split(' ').join(' ');
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment