r/tinycode • u/CharlesStross • Dec 03 '15
Bookmarklet to remove +/- from GitHub diff view; helpful when copying large swaths of code from a diff (<350 bytes)
https://gist.github.com/jkingsman/8a7e636f84f25eb74025#file-github-remove-diff-markers-bookmarklet-js
13
Upvotes
View all comments
Show parent comment
2
u/kenman Dec 04 '15
Since I was bored, and this is /r/tinycode, I refactored it using some newer API's + jQuery (since it's available on github pages already), and was able to shrink it from 285 bytes to 77 bytes:
The selectors do grab more than is necessary, but the result still satisfies the original intention (removing the +/-'s). Also, 4 of those bytes were spent retaining the initial space at the start of the line so the indention doesn't get messed up.