Last active
March 18, 2022 21:23
-
-
Save Braunson/66b87ab02396bccc3495fccda5430559 to your computer and use it in GitHub Desktop.
Auto ignore whitespace in GitHub Pull Requests
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
// ==UserScript== | |
// @name GitHub Auto Click Ignore Whitespaces in PRs | |
// @namespace https://braunson.ca | |
// @version 1.0 | |
// @description Auto click enable whitespace by default on GitHub Pull Requests | |
// @author Braunson Yager | |
// @match https://github.com/*/*/pull/* | |
// @grant none | |
// @downloadURL https://gist.githubusercontent.com/Braunson/66b87ab02396bccc3495fccda5430559/raw/07c93d2907769768a2e5554e36d44726dea22a3d/github_auto_enable_ignore_whitespace?v=1.0 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
for (let link of document.getElementsByClassName('tabnav-tab')) { | |
if (link.nodeName === 'A' && link.href.endsWith('files')) { | |
link.href += '?w=1'; | |
link.click(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment