// ==UserScript== // @name Live Chat Pop-up // @namespace http://tampermonkey.net/ // @version 1.1 // @description Open live chat in a pop-up window on new broadcast platforms // @author 때이엠 // @match https://chzzk.naver.com/live/* // @grant none // @updateURL https://raw.githubusercontent.com/Eodl2/Chat-Modifier/main/ChatModifier/LiveChatPopUp.js // @downloadURL https://raw.githubusercontent.com/Eodl2/Chat-Modifier/main/ChatModifier/LiveChatPopUp.js // ==/UserScript== (function () { "use strict"; const isDebugMode = false; // Set to true for debugging, false for normal operation // Function to update the width of the chat container function updateChatWidth() { var width = document.getElementById("chatWidthInput").value; var chatContainer = document.querySelector( ".live_chatting_container__SvtrD" ); if (chatContainer) { chatContainer.style.width = width + "px"; } } // Create an input box for width var inputBox = document.createElement("input"); inputBox.id = "chatWidthInput"; inputBox.type = "number"; inputBox.placeholder = "채팅창 크기(기본값 353)"; inputBox.style.position = "fixed"; inputBox.style.top = "20px"; inputBox.style.right = "200px"; inputBox.style.zIndex = "1000"; inputBox.style.backgroundColor = "white"; // Better visibility on black background inputBox.style.color = "black"; inputBox.style.border = "1px solid gray"; inputBox.style.padding = "2px"; inputBox.style.borderRadius ='8px' // Add an event listener to the input box inputBox.addEventListener("change", updateChatWidth); // Append the input box to the body document.body.appendChild(inputBox); // Function to copy styles to the pop-up function copyStyles(sourceDoc, targetDoc) { Array.from(sourceDoc.styleSheets).forEach((styleSheet) => { try { if (styleSheet.cssRules) { // for