// ==UserScript== // @name Remove Title and Change Favicon on WhatsApp Web // @namespace http://tampermonkey.net/ // @version 1.1 // @description Remove the title and change the favicon on WhatsApp Web every 5 seconds // @match https://web.whatsapp.com/* // @grant none // ==/UserScript== (function() { 'use strict'; function modifyTab() { document.title = ''; const faviconSize = 32; const canvas = document.createElement('canvas'); canvas.width = faviconSize; canvas.height = faviconSize; const ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.arc(faviconSize / 2, faviconSize / 2, faviconSize / 2, 0, 2 * Math.PI); ctx.fillStyle = '#28834a'; ctx.fill(); const faviconUrl = canvas.toDataURL('image/png'); const linkElements = document.querySelectorAll("link[rel*='icon']"); linkElements.forEach(link => link.parentNode.removeChild(link)); const newFavicon = document.createElement('link'); newFavicon.rel = 'icon'; newFavicon.href = faviconUrl; document.head.appendChild(newFavicon); // remove badge on list messaages const gridCells = document.querySelectorAll('[role="gridcell"]'); gridCells.forEach(gridCell => { const deepestParent = gridCell.querySelector('*'); if (deepestParent) { const lastChild = deepestParent.lastElementChild; if (lastChild) { if (lastChild.hasAttribute('style')) { deepestParent.removeChild(lastChild); } } } }); } setInterval(modifyTab, 5000); modifyTab(); })();