Github code review page formatter

Automatically set split and ignore whitespace mode on github

  1. // ==UserScript==
  2. // @name Github code review page formatter
  3. // @version 1.0
  4. // @description Automatically set split and ignore whitespace mode on github
  5. // @author Me
  6. // @match https://github.com/*/pull/*/files
  7. // @grant none
  8. // @run-at document-start
  9. // @namespace https://greatest.deepsurf.us/users/671379
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. if(! /\bdiff=split&w=1\b/.test(location.search))
  16. {
  17. document.location.href = document.location.href + "?diff=split&w=1";
  18. }
  19. })();