Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save trietsch/6e9164811d564656f5419349f0fa8b78 to your computer and use it in GitHub Desktop.

Select an option

Save trietsch/6e9164811d564656f5419349f0fa8b78 to your computer and use it in GitHub Desktop.
Prevent Azure DevOps from hijacking normal copy behavior in Azure DevOps
// ==UserScript==
// @name Disable copy shortkey DevOps
// @version 1.0.0
// @description DevOps does not allow using cmd+C to copy, this fixes that
// @author Robin Trietsch
// @match https://dev.azure.com/*
// @run-at document-idle
// ==/UserScript==
window.addEventListener('keydown', e => {
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'c') {
e.stopImmediatePropagation();
return true;
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment