WhatsApp Web - Disable Ctrl+Delete Shortcut

Prevents WhatsApp Web from clearing chat when pressing Ctrl+Delete

当前为 2025-04-11 提交的版本,查看 最新版本

// ==UserScript==
// @name         WhatsApp Web - Disable Ctrl+Delete Shortcut
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Prevents WhatsApp Web from clearing chat when pressing Ctrl+Delete
// @author       oscardianno
// @match        https://web.whatsapp.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

document.addEventListener('keydown', function(e) {
    if (e.key === 'Delete' && e.ctrlKey) {
        e.stopImmediatePropagation();
    }
}, true);