Compact Chat

Toggle chat compactfulness

  1. // ==UserScript==
  2. // @name Compact Chat
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-11-15
  5. // @description Toggle chat compactfulness
  6. // @author Realwdpcker on PixelPlace.io
  7. // @match https://pixelplace.io/*
  8. // @icon https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSPzgxYoFXDSUZWfvztvgoWkP_slpX8hNloHg&s
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const compactToggle = () => {
  16. const rows = document.querySelectorAll('#container #chat .messages .row');
  17. rows.forEach(row => {
  18. row.style.padding = '2px 0px';
  19. });
  20. };
  21.  
  22. const observer = new MutationObserver(compactToggle);
  23. const target = document.querySelector('#container');
  24. if (target) {
  25. observer.observe(target, { childList: true, subtree: true });
  26. }
  27. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址