Skip to content

Instantly share code, notes, and snippets.

@smrq
Created April 18, 2016 18:17
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 smrq/17de8a7bb5e1ec5051094acdbe428e35 to your computer and use it in GitHub Desktop.
Save smrq/17de8a7bb5e1ec5051094acdbe428e35 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Collaborator Accept File Hotkey
// @match https://codecoll.directs.com:8443/*
// @description Adds a hotkey to Collaborator to accept the current file
// @version 0.1
// ==/UserScript==
(function() {
document.addEventListener('keydown', function(e) {
if (e.keyCode === 55 && // 7/ampersand
e.shiftKey &&
e.ctrlKey &&
!e.altKey &&
!e.metaKey)
{
var elt = document.getElementsByClassName('GFJ3TKXBDXB')[0].children[0];
elt.click();
elt.style.opacity = 0.2;
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment