Last active
August 29, 2015 14:26
-
-
Save nsams/7268c55d3ac4379ae5ab to your computer and use it in GitHub Desktop.
Phabricator Accept Shortcut
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 Phabricator Accept Shortcut | |
// @namespace http://www.vivid-planet.com/ | |
// @version 0.1 | |
// @description enter something useful | |
// @author Niko Sams | |
// @match http://phabricator.dev.vivid-planet.com/* | |
// @grant none | |
// ==/UserScript== | |
document.addEventListener("keypress", function(ev) { | |
if (ev.charCode == 97 && ev.target == document.body) { | |
document.getElementById('audit-action').value = 'accept'; | |
document.body.querySelector('form[action="/audit/addcomment/"]').submit(); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment