Skip to content

Instantly share code, notes, and snippets.

@gustavomdsantos
Last active May 30, 2025 01:02
Show Gist options
  • Save gustavomdsantos/0fa1710f7bb121a2818efc1520cf3e33 to your computer and use it in GitHub Desktop.
Save gustavomdsantos/0fa1710f7bb121a2818efc1520cf3e33 to your computer and use it in GitHub Desktop.
"WhatsApp Web" Banner Remover - User JS for Tampermonkey / Greasemonkey / Violentmonkey.
// ==UserScript==
// @name WhatsApp Welcome Banner Remover
// @namespace https://github.com/gustavomdsantos
// @version 1.1
// @description Removes the annoying WhatsApp welcome banner.
// @author Gustavo Moraes ([email protected])
// @match https://web.whatsapp.com/*
// @icon https://gist.githubusercontent.com/gustavomdsantos/0fa1710f7bb121a2818efc1520cf3e33/raw/Welcome-WhatsApp-Remover-icon.png
// @grant none
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
const targetSelector = ".xktia5q.x27kpxv.x135pmgq.x2b8uid";
const upperDivSelector = ".xsknx04";
function removeWelcomeBanner() {
const banner = document.querySelector(targetSelector);
if (banner) {
console.log("[UserScript] Welcome banner found, removing...");
banner.remove();
}
const upperDiv = document.querySelector(upperDivSelector);
if (upperDiv) {
upperDiv.style.backgroundColor = "#0b141a";
}
}
// Runs on initial load
removeWelcomeBanner();
// Observe changes in DOM
const observer = new MutationObserver(() => {
removeWelcomeBanner();
});
observer.observe(document, {
childList: true,
subtree: true
});
})();
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment