Cancel Ctrl+X

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

目前为 2023-11-26 提交的版本。查看 最新版本

  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.0
  6. // @match https://vello.ai/*
  7. // @grant none
  8. // @run-at document-start
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. console.log('Userscript to intercept and cancel Ctrl+X is activated.');
  13.  
  14. document.addEventListener('keydown', function(event) {
  15. if (event.ctrlKey && event.key === 'x') {
  16. event.preventDefault();
  17. event.stopImmediatePropagation();
  18. console.log('Ctrl+X pressed and action cancelled.');
  19. }
  20. }, true);