Cancel Ctrl+X

This userscript prevents the Ctrl+X action on the Vello AI website.

  1. // ==UserScript==
  2. // @name Cancel Ctrl+X
  3. // @namespace CtrlXInterceptorVelloAI
  4. // @description This userscript prevents the Ctrl+X action on the Vello AI website.
  5. // @version 1.0.1
  6. // @icon https://www.google.com/s2/favicons?sz=64&domain=vello.ai
  7. // @match https://vello.ai/*
  8. // @grant none
  9. // @run-at document-start
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. console.log('Userscript to intercept and cancel Ctrl+X is activated.');
  14.  
  15. document.addEventListener('keydown', function(event) {
  16. if (event.ctrlKey && event.key === 'x') {
  17. event.preventDefault();
  18. event.stopImmediatePropagation();
  19. console.log('Ctrl+X pressed and action cancelled.');
  20. }
  21. }, true);