Last active
March 10, 2016 19:29
-
-
Save murielsilveira/d7cbff99a3f2d8706e54 to your computer and use it in GitHub Desktop.
GitHub diff with whitespace ignored
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
javascript:(function(){ | |
if (document.location.host === 'github.com') { | |
var query = document.location.search; | |
if (query === '') { | |
document.location = document.location + '?w=1'; | |
} else if (query.indexOf('w=') === -1){ | |
document.location = document.location + '&w=1'; | |
} else { | |
var index = query.indexOf('w='); | |
var arr = query.substr(index).split('&'); | |
arr[0] = 'w=1'; | |
var newQuery = query.slice(0,index) + arr.join('&'); | |
var newUrl = document.location.origin + document.location.pathname + newQuery; | |
document.location = newUrl; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment