Skip to content

Instantly share code, notes, and snippets.

@nsams
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsams/7268c55d3ac4379ae5ab to your computer and use it in GitHub Desktop.
Save nsams/7268c55d3ac4379ae5ab to your computer and use it in GitHub Desktop.
Phabricator Accept Shortcut
// ==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