npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

seminarjs-chat

v0.0.2

Published

Chat plugin for Seminarjs

Downloads

3

Readme

Seminarjs-Chat

Build Status Dependency Status NPM version

###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 = require("seminarjs-chat");
chat(App);

Finally, on public/index.html add the following:

<link href="/plugins/chat/css/chat-irc.css" rel="stylesheet" media="all">
<!-- Make sure the following JavaScript is added after Socket.io and jQuery -->
<script src="/plugins/chat/js/chat-client.js"></script>
<script type="text/javascript">
  var socket = io();
  Chat.init(socket);
</script>

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:

<div id="plugin_Chat">
  <div class="viewport-header row">
    <div class="col-md-7"><h2>Chat</h2><small class="typing"></small></div>
    <div class="col-md-5 text-right online"><div>online</div></div>                  
  </div>
  <div class="chat-window">
    <div class="viewport">
      <div class="viewport-content"></div>
    </div>

    <form class="row row-chat">
        <div class="input-group">
            <input type="text" class="form-control" placeholder="Type your message" />

            <span class="input-group-btn">
                <button type="submit" class="btn btn-primary">Send</button>
            </span>
        </div>
    </form>
  </div>
  <div class="login-window row">
    <form>
        <div class="input-group">
            <input type="text" class="form-control" placeholder="Username" />

            <span class="input-group-btn">
                <button type="submit" class="btn btn-primary">Login</button>
            </span>
        </div>
    </form>
  </div>
</div>

The configuration options for the chat are:

{
	$window: $(window),
	$usernameInput: $('#plugin_Chat .login-window input'),
	$loginForm: $('#plugin_Chat .login-window form'),
	$chatForm: $('#plugin_Chat .chat-window form'),
	$online: $('#plugin_Chat .viewport-header .online div'),
	$messages: $('#plugin_Chat .viewport-content'),
	$inputMessage: $('#plugin_Chat .chat-window input'),
	$loginPage: $('#plugin_Chat .login-window'),
	$chatPage: $('#plugin_Chat .chat-window'),
	smoothScrolling: 400
}

These are passed to the Chat initializer as a second parameter:

<script type="text/javascript">
  var socket = io();
  Chat.init(socket, {
    smoothScrolling: false
  });
</script>

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