forked from andrerpena/chatjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
115 lines (102 loc) · 5.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Facebook style jQuery plugin for chatting</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- chatjs requirements -->
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="ChatJs/js/jquery.autosize.js"></script>
<!-- chatjs files-->
<script src="ChatJs/js/jquery.chatjs.utils.js"></script>
<script src="ChatJs/js/jquery.chatjs.adapter.servertypes.js"></script>
<script src="ChatJs/js/jquery.chatjs.adapter.js"></script>
<script src="ChatJs/js/jquery.chatjs.adapter.demo.js"></script>
<script src="ChatJs/js/jquery.chatjs.window.js"></script>
<script src="ChatJs/js/jquery.chatjs.messageboard.js"></script>
<script src="ChatJs/js/jquery.chatjs.userlist.js"></script>
<script src="ChatJs/js/jquery.chatjs.pmwindow.js"></script>
<script src="ChatJs/js/jquery.chatjs.friendswindow.js"></script>
<script src="ChatJs/js/jquery.chatjs.controller.js"></script>
<link rel="stylesheet" href="ChatJs/css/jquery.chatjs.css" />
<script type="text/javascript">
$(function () {
$.chat({
// your user information
userId: 1,
// id of the room. The friends list is based on the room Id
roomId: 1,
// text displayed when the other user is typing
typingText: ' is typing...',
// text displayed when there's no other users in the room
emptyRoomText: "There's no one around here. You can still open a session in another browser and chat with yourself :)",
// the adapter you are using
chatJsContentPath: '/Chatjs/',
adapter: new DemoAdapter()
});
});
</script>
</head>
<body>
<div class="wrapper">
<header>
<h1>Chatjs</h1>
<p>Facebook style jQuery plugin for instant messaging.</p>
<p class="view"><a href="https://github.com/andrerpena/chatjs">View the Project on GitHub <small>andrerpena/chatjs</small></a></p>
<ul>
<li><a href="https://github.com/andrerpena/chatjs/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/andrerpena/chatjs/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/andrerpena/chatjs">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h3>
<a name="welcome-to-github-pages" class="anchor" href="#welcome-to-github-pages"><span class="octicon octicon-link"></span></a>Welcome to ChatjS
</h3>
<p>ChatJS is a jQuery plugin for instant messaging. It's completely client-side, so it's completely platform agnostic. </p>
<p>Server side communication is implemented through Adapters. The adapter is the piece of code that is responsible for handling client/server
communucation. ChatJS comes with a demo adapter that you can see running in the bottom right of this page. It's just an echobot that will repeat what you say.
You can use it as a boilerplate to implement your own. The server portion of your solution will be written according to the adapter specification.
</p>
<p>I intend to display here a list of all adapter implementations. ASP.NET MVC coming soon.</p>
<p>Once your server code is ready, that's how ChatjS looks in the client:</p>
<pre><code><script type="text/javascript">
$(function () {
$.chat({
userId: 1,
roomId: 1,
typingText: ' is typing...',
emptyRoomText: "There's no one around here.",
chatJsContentPath: '/basics/chatjs/',
adapter: new DemoAdapter()
});
});
</script>
</code></pre>
<h3>Contributing</h3>
<p>Pull requests are very welcome.</p>
<p>If you want to implement an adapter, that's very welcome too. Please let me know if you need assistance by submitting a <a href="https://github.com/andrerpena/chatjs/issues">GitHub issue</a>.
I have a tight schedule but I'll answer as I have time.</p>
<p>
ChatJS is written in <a href="http://www.typescriptlang.org/">TypeScript</a>. If you are not familiar with it, TypeScript has a flat learning curve, as it's a JavaScript superset. If know JavaScript, you know TypeScript, except for the aspects in which it adds
to the language.
</p>
<p>
I develop ChatJS in <a href="http://msdn.microsoft.com/en-us/vstudio/aa718325.aspx">Visual studio</a> because it's the IDE that i'm most used to and it has great typescript support. Alternatively, you can use
<a href="http://www.jetbrains.com/webstorm/">WebStorm</a> or simply use your editor of choice and the <a href="https://www.npmjs.org/package/typescript">NPM TypeScript Transpiler</a> to make it into vanilla JavaScript.
</p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/andrerpena">andrerpena</a></p>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>