Forked from jkingsman/github-remove-diff-markers-bookmarklet.js
Created
December 4, 2015 00:47
-
-
Save Braunson/5c8e58551e5284f51bd8 to your computer and use it in GitHub Desktop.
Remove the '+' and '-' from GitHub diff view; helpful when copying large swaths of code from a diff.
This file contains hidden or 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
javascript:(function(){for(var elements=document.getElementsByClassName("blob-code-inner"),i=0;i<elements.length;i++)(elements[i].parentNode.classList.contains("blob-code-addition")||elements[i].parentNode.classList.contains("blob-code-deletion"))&&(elements[i].innerHTML=elements[i].innerHTML.substring(1));})(); |
This file contains hidden or 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
var elements = document.getElementsByClassName('blob-code-inner'); | |
for(var i = 0; i < elements.length; i++){ | |
if(elements[i].parentNode.classList.contains('blob-code-addition') || elements[i].parentNode.classList.contains('blob-code-deletion')){ | |
elements[i].innerHTML = elements[i].innerHTML.substring(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment