// ==UserScript== // @name Badge Toggle // @namespace http://tampermonkey.net/ // @version 1.0 // @description Toggle visibility of chat badges // @author guildedbird // @match https://pixelplace.io/* // @grant none // @license MIT // @downloadURL https://update.greasyfork.cloud/scripts/532846/Badge%20Toggle.user.js // @updateURL https://update.greasyfork.cloud/scripts/532846/Badge%20Toggle.meta.js // ==/UserScript== (function() { 'use strict'; const EXCLUDED_BADGES = [ "/img/badges/moderator.png", "/img/badges/chat-moderator.png", "/img/badges/former-global-moderator.png", "/img/badges/painting-moderator.png", "/img/badges/painting-owner.png", "/img/badges/admin.png" ]; function updateBadgeVisibility(showBadges) { const images = document.querySelectorAll('#chat .messages .row img'); images.forEach(img => { const src = img.getAttribute('src'); if (!EXCLUDED_BADGES.includes(src)) { img.style.display = showBadges ? '' : 'none'; } }); } function showNotification(isEnabled) { setTimeout(() => { const notifications = document.querySelector('#notification'); if (!notifications) return; const existingNotification = notifications.querySelector('.box'); if (existingNotification) existingNotification.remove(); const notification = document.createElement('div'); notification.className = isEnabled ? 'box success' : 'box warning'; notification.innerHTML = `