Greasy Fork

koc chat

chat test

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.cloud/scripts/534139/1578638/koc%20chat.js


      Tabs.chat = {
    tabOrder: 9002,
    tabLabel: 'Chat(no mods)',
    tabColor: 'purple',
    myDiv: null,
    Options: {
        Counter: 0, // This counter doesn't seem to be used
    },

    init: function(div) {
        var t = Tabs.chat;
        t.myDiv = div;

        // Simplified options initialization
        Options.chat = Options.chat || t.Options; 
    },

    hide: function() {
        // Currently does nothing, but could be used to pause chat updates or 
        // remove the iframe to save resources.  For example:
        // this.myDiv.innerHTML = '';
    },

    show: function() {
        var t = Tabs.chat;

        var m = 'https://us28.chatzy.com/m/21183371900079'; // Corrected URL formatting
        t.myDiv.innerHTML = '<iframe src="' + m + '" style="width:100%; height:500px; border:none;"></iframe>';

        // Removed redundant code. Options.chat.Counter is unused.
    },
};