숲 - 채팅 크게보기

세로가 긴 화면에서 필요 없는 UI를 숨겨 채팅을 크게 봅니다.

  1. // ==UserScript==
  2. // @name 숲 - 채팅 크게보기
  3. // @namespace https://www.sooplive.co.kr/
  4. // @version 2024-10-15
  5. // @description 세로가 긴 화면에서 필요 없는 UI를 숨겨 채팅을 크게 봅니다.
  6. // @author minibox
  7. // @match https://play.sooplive.co.kr/*/*
  8. // @icon https://www.sooplive.co.kr/favicon.ico
  9. // @run-at document-end
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. const btn = document.createElement("button");
  14.  
  15. btn.style.width = "24px";
  16. btn.style.height = "24px";
  17. btn.style.backgroundImage =
  18. 'url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2224px%22%20viewBox%3D%220%20-960%20960%20960%22%20width%3D%2224px%22%20fill%3D%22%23d5d7dc%22%3E%3Cpath%20d%3D%22M240-120v-120H120v-80h200v200h-80Zm400%200v-200h200v80H720v120h-80ZM120-640v-80h120v-120h80v200H120Zm520%200v-200h80v120h120v80H640Z%22%2F%3E%3C%2Fsvg%3E")';
  19. btn.style.marginLeft = "auto";
  20.  
  21. btn.onclick = (e) => {
  22. const styles = [
  23. ["#webplayer_contents", "height", "100vh"],
  24. ["#webplayer_contents", "margin", "0"],
  25. ["#soop-gnb", "display", "none"],
  26. [".player_bottom", "display", "none"],
  27. [".chat_title", "display", "none"],
  28. [".section_selectTab", "display", "none"],
  29. [".wrapping.side", "padding", "0"],
  30. ];
  31.  
  32. if (e.target.classList.contains("off")) {
  33. styles.forEach((item) => {
  34. document.querySelector(item[0]).style[item[1]] = "";
  35. });
  36. e.target.classList.remove("off");
  37. } else {
  38. styles.forEach((item) => {
  39. document.querySelector(item[0]).style[item[1]] = item[2];
  40. });
  41. e.target.classList.add("off");
  42. }
  43. };
  44.  
  45. document.querySelector("#ul2").appendChild(btn);

QingJ © 2025

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