Seminarjs-Chat
Installation
Once you have an instance of Seminarjs running, install the chat as an extra npm module:
npm install seminarjs-chat --save
Now head over to the index.js
file in Seminarjs, and add the following to the end:
var chat = ;;
Finally, on public/index.html
add the following:
<!-- Make sure the following JavaScript is added after Socket.io and jQuery -->
Your HTML will need to have the necesary HTML elements for the Chat. These can be set in any order and layout, but you will need to overwrite some settings if you change things. A sample HTML layout using Bootstrap 3:
Chat online Send Login
The configuration options for the chat are:
$window: $usernameInput: $loginForm: $chatForm: $online: $messages: $inputMessage: $loginPage: $chatPage: smoothScrolling: 400
These are passed to the Chat initializer as a second parameter:
If you override the selectors, the content that normally goes in them will appear on the ones you specify. You can use this to display data in multiple places for instance, showing the list of online users in more than one place.
License
Plugin released under the MIT license