SOOP(숲) 채팅창 복사/붙여넣기 활성화 (by 도연)

SOOP(숲) 채팅창에서 복사/붙여넣기를 활성화하도록 변경합니다. (Made by 도연)

当前为 2024-10-17 提交的版本,查看 最新版本

// ==UserScript==
// @name         SOOP(숲) 채팅창 복사/붙여넣기 활성화 (by 도연)
// @namespace    http://tampermonkey.net/
// @version      1.0.4
// @description  SOOP(숲) 채팅창에서 복사/붙여넣기를 활성화하도록 변경합니다. (Made by 도연)
// @author       https://github.com/dokdo2013
// @license      MIT
// @match        https://play.sooplive.co.kr/*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    const update = () => {
        $("#write_area").off("cut copy paste");
        $("#write_area").on("paste", function(event) {
            // 기본 동작을 허용
            event.stopPropagation(); // 다른 이벤트 전파 방지
            event.preventDefault(); // 이벤트 기본 동작 방지
            const clipboardData = event.originalEvent.clipboardData || window.clipboardData;
            const pastedData = clipboardData.getData('text');
     
            // 붙여넣기 텍스트를 수동으로 입력
            document.execCommand("insertText", false, pastedData);
        });

        console.log("enable copy/paste");
    };

    const interval = setInterval(update, 500);

    setTimeout(() => {
        clearInterval(interval)
    }, 30000);

})();

QingJ © 2025

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