Last active
August 26, 2022 10:30
-
-
Save Jodaille/17a7cc2d056a4afd33d54f9fdbd82695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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