Temporary wrapper for Eterna's legacy IRC chat client to support easy installation and multiple channels
npm install --save eternagame/eterna-chat-wrapper
import { Chat } from "eterna-chat-wrapper";
const chat = new Chat({
container: document.getElementById('chat-container'),
username: 'Anonymous',
uid: '000000',
onHidden: () => {
console.log('Chat.onHidden()')
}
});
// Hide the chat without destroying it
chat.hide();
// Show an existing chat again
chat.show();
See the example
folder.