Greasy Fork is available in English.

Github Whitespace Ignorer

Ignores whitespace on Github Diffs

  1. // ==UserScript==
  2. // @name Github Whitespace Ignorer
  3. // @namespace ameboide
  4. // @author ameboide
  5. // @description Ignores whitespace on Github Diffs
  6. // @include *://github.com/*
  7. // @version 1
  8. // ==/UserScript==
  9.  
  10. function w1(){
  11. var as = document.querySelectorAll('[href*="/commit/"]:not([href$="w=1"]), [href*="/pull/"]:not([href$="w=1"])');
  12. for(var i=0; i<as.length; i++){
  13. as[i].href += (as[i].href.indexOf('?') > -1 ? '&' : '?') + 'w=1';
  14. }
  15. }
  16. setInterval(w1, 1000);