您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Alert when a message is deleted in WhatsApp Web.
// ==UserScript== // @name WhatsApp Deleted Messages Viewer // @namespace http://tampermonkey.net/ // @version 1.0 // @description Alert when a message is deleted in WhatsApp Web. // @author Yusuf Sameh // @match https://web.whatsapp.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to handle incoming messages function handleNewMessages(mutationsList) { mutationsList.forEach(mutation => { if (mutation.type === 'childList') { mutation.addedNodes.forEach(node => { if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains('message-in')) { const message = node.querySelector('.message-in .selectable-text'); if (message && message.textContent === 'This message was deleted') { alert('A message was deleted.'); } } }); } }); } // Select the target node const targetNode = document.querySelector('#pane-side'); // Options for the observer (which mutations to observe) const config = { childList: true, subtree: true }; // Check if targetNode exists before observing mutations if (targetNode) { // Create an observer instance linked to the callback function const observer = new MutationObserver(handleNewMessages); // Start observing the target node for configured mutations observer.observe(targetNode, config); } else { console.error('Target node not found.'); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址