xonecas.io
73
Ch

Chatroom / commit 4b451d0

separated from xonecas.com and into a new project

xonecas2011-04-01 4b451d0713a35b3b85e56a953ce11c8dea4c6948

20 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

README+1−0
@@ -0,0 +1 @@
1+This is my personal boilerplate for my node projects. It is a mashup of connect.js, html5boilerplate, qwery, and more to come i'm sure.
favicon.ico+0−0
Binary file, not shown.
htdocs/css/handheld.css+8−0
@@ -0,0 +1,8 @@
1+* {
2+ float: none; /* Screens are not big enough to account for floats */
3+ background: #fff; /* As much contrast as possible */
4+ color: #000;
5+}
6+
7+/* Slightly reducing font size to reduce need to scroll */
8+body { font-size: 80%; }
htdocs/css/style.css+325−0
@@ -0,0 +1,325 @@
1+/**
2+ * HTML5 ✰ Boilerplate
3+ *
4+ * style.css contains a reset, font normalization and some base styles.
5+ *
6+ * Credit is left where credit is due.
7+ * Much inspiration was taken from these projects:
8+ * - yui.yahooapis.com/2.8.1/build/base/base.css
9+ * - camendesign.com/design/
10+ * - praegnanz.de/weblog/htmlcssjs-kickstart
11+ */
12+
13+
14+/**
15+ * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
16+ * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
17+ * html5doctor.com/html-5-reset-stylesheet/
18+ */
19+
20+html, body, div, span, object, iframe,
21+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
22+abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
23+small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
24+fieldset, form, label, legend,
25+table, caption, tbody, tfoot, thead, tr, th, td,
26+article, aside, canvas, details, figcaption, figure,
27+footer, header, hgroup, menu, nav, section, summary,
28+time, mark, audio, video {
29+ margin: 0;
30+ padding: 0;
31+ border: 0;
32+ font-size: 100%;
33+ font: inherit;
34+ vertical-align: baseline;
35+}
36+
37+article, aside, details, figcaption, figure,
38+footer, header, hgroup, menu, nav, section {
39+ display: block;
40+}
41+
42+blockquote, q { quotes: none; }
43+
44+blockquote:before, blockquote:after,
45+q:before, q:after { content: ""; content: none; }
46+
47+ins { background-color: #ff9; color: #000; text-decoration: none; }
48+
49+mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
50+
51+del { text-decoration: line-through; }
52+
53+abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
54+
55+table { border-collapse: collapse; border-spacing: 0; }
56+
57+hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
58+
59+input, select { vertical-align: middle; }
60+
61+
62+/**
63+ * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
64+ */
65+
66+body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
67+select, input, textarea, button { font:99% sans-serif; }
68+
69+/* Normalize monospace sizing:
70+ en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
71+pre, code, kbd, samp { font-family: monospace, sans-serif; }
72+
73+
74+/**
75+ * Minimal base styles.
76+ */
77+
78+/* Always force a scrollbar in non-IE */
79+html { overflow-y: scroll; }
80+
81+/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
82+a:hover, a:active { outline: none; }
83+
84+ul, ol { margin-left: 2em; }
85+ol { list-style-type: decimal; }
86+
87+/* Remove margins for navigation lists */
88+nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
89+
90+small { font-size: 85%; }
91+strong, th { font-weight: bold; }
92+
93+td { vertical-align: top; }
94+
95+/* Set sub, sup without affecting line-height: gist.github.com/413930 */
96+sub, sup { font-size: 75%; line-height: 0; position: relative; }
97+sup { top: -0.5em; }
98+sub { bottom: -0.25em; }
99+
100+pre {
101+ /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
102+ white-space: pre; white-space: pre-wrap; word-wrap: break-word;
103+ padding: 15px;
104+}
105+
106+textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
107+
108+.ie6 legend, .ie7 legend { margin-left: -7px; }
109+
110+/* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
111+input[type="radio"] { vertical-align: text-bottom; }
112+input[type="checkbox"] { vertical-align: bottom; }
113+.ie7 input[type="checkbox"] { vertical-align: baseline; }
114+.ie6 input { vertical-align: text-bottom; }
115+
116+/* Hand cursor on clickable input elements */
117+label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
118+
119+/* Webkit browsers add a 2px margin outside the chrome of form elements */
120+button, input, select, textarea { margin: 0; }
121+
122+/* Colors for form validity */
123+input:valid, textarea:valid { }
124+input:invalid, textarea:invalid {
125+ border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red;
126+}
127+.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
128+
129+
130+/* These selection declarations have to be separate
131+ No text-shadow: twitter.com/miketaylr/status/12228805301
132+ Also: hot pink! */
133+::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
134+::selection { background:#FF5E99; color:#fff; text-shadow: none; }
135+
136+/* j.mp/webkit-tap-highlight-color */
137+a:link { -webkit-tap-highlight-color: #FF5E99; }
138+
139+/* Make buttons play nice in IE:
140+ www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
141+button { width: auto; overflow: visible; }
142+
143+/* Bicubic resizing for non-native sized IMG:
144+ code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
145+.ie7 img { -ms-interpolation-mode: bicubic; }
146+
147+/**
148+ * You might tweak these..
149+ */
150+
151+body, select, input, textarea {
152+ /* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
153+ color: #444;
154+ /* Set your base font here, to apply evenly */
155+ /* font-family: Georgia, serif; */
156+}
157+
158+/* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */
159+h1, h2, h3, h4, h5, h6 { font-weight: bold; }
160+
161+a, a:active, a:visited { color: #607890; }
162+a:hover { color: #036; }
163+
164+
165+/**
166+ * Primary styles
167+ *
168+ * Author: @xonecas
169+ */
170+
171+
172+input { width: 174px; padding: 5px 10px 6px; margin-top: 5px;}
173+
174+#user {
175+ width: 200px;
176+ margin: 0 auto;
177+ padding: 20px;
178+}
179+#go { float: right; margin-top:5px; }
180+
181+#box {
182+ width: 800px;
183+ margin: 0 auto;
184+}
185+#box textarea {
186+ width: 770px;
187+ margin: 5px 0;
188+ padding: 5px 10px 6px;
189+}
190+#send { float: right; margin-top:5px; margin-right: 10px; }
191+
192+#chat {
193+ list-style: none;
194+ width: 800px;
195+ margin: 3em auto 1em;
196+}
197+#chat li { margin-bottom: 5px; }
198+
199+.raisa { color: pink; }
200+
201+.awesome, .awesome:visited {
202+ background: #222 url(/img/alert-overlay.png) repeat-x;
203+ display: inline-block;
204+ padding: 5px 10px 6px;
205+ color: #fff;
206+ text-decoration: none;
207+ -moz-border-radius: 5px;
208+ -webkit-border-radius: 5px;
209+ -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
210+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
211+ text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
212+ border-bottom: 1px solid rgba(0,0,0,0.25);
213+ position: relative;
214+ cursor: pointer;
215+}
216+
217+ .awesome:hover { background-color: #111; color: #fff; }
218+ .awesome:active { top: 1px; }
219+ .small.awesome, .small.awesome:visited { font-size: 11px; padding: ; }
220+ .awesome, .awesome:visited,
221+ .medium.awesome, .medium.awesome:visited { font-size: 13px; font-weight: bold; line-height: 1; text-shadow: 0 -1px 1px rgba(0,0,0,0.25); }
222+ .large.awesome, .large.awesome:visited { font-size: 14px; padding: 8px 14px 9px; }
223+
224+ .green.awesome, .green.awesome:visited { background-color: #91bd09; }
225+ .green.awesome:hover { background-color: #749a02; }
226+ .blue.awesome, .blue.awesome:visited { background-color: #2daebf; }
227+ .blue.awesome:hover { background-color: #007d9a; }
228+ .red.awesome, .red.awesome:visited { background-color: #e33100; }
229+ .red.awesome:hover { background-color: #872300; }
230+ .magenta.awesome, .magenta.awesome:visited { background-color: #a9014b; }
231+ .magenta.awesome:hover { background-color: #630030; }
232+ .orange.awesome, .orange.awesome:visited { background-color: #ff5c00; }
233+ .orange.awesome:hover { background-color: #d45500; }
234+ .yellow.awesome, .yellow.awesome:visited { background-color: #ffb515; }
235+ .yellow.awesome:hover { background-color: #fc9200; }
236+
237+
238+
239+
240+
241+
242+
243+
244+
245+
246+
247+
248+
249+
250+/**
251+ * Non-semantic helper classes: please define your styles before this section.
252+ */
253+
254+/* For image replacement */
255+.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
256+
257+/* Hide for both screenreaders and browsers:
258+ css-discuss.incutio.com/wiki/Screenreader_Visibility */
259+.hidden { display: none; visibility: hidden; }
260+
261+/* Hide only visually, but have it available for screenreaders: by Jon Neal.
262+ www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
263+.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
264+/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */
265+.visuallyhidden.focusable:active,
266+.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
267+
268+/* Hide visually and from screenreaders, but maintain layout */
269+.invisible { visibility: hidden; }
270+
271+/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements.
272+ j.mp/bestclearfix */
273+.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
274+.clearfix:after { clear: both; }
275+/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
276+.clearfix { zoom: 1; }
277+
278+
279+
280+/**
281+ * Media queries for responsive design.
282+ *
283+ * These follow after primary styles so they will successfully override.
284+ */
285+
286+@media all and (orientation:portrait) {
287+ /* Style adjustments for portrait mode goes here */
288+
289+}
290+
291+@media all and (orientation:landscape) {
292+ /* Style adjustments for landscape mode goes here */
293+
294+}
295+
296+/* Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome)
297+ consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
298+@media screen and (max-device-width: 480px) {
299+
300+
301+ /* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you: j.mp/textsizeadjust */
302+ /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
303+}
304+
305+
306+/**
307+ * Print styles.
308+ *
309+ * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
310+ */
311+@media print {
312+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
313+ -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
314+ a, a:visited { color: #444 !important; text-decoration: underline; }
315+ a[href]:after { content: " (" attr(href) ")"; }
316+ abbr[title]:after { content: " (" attr(title) ")"; }
317+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
318+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
319+ thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
320+ tr, img { page-break-inside: avoid; }
321+ @page { margin: 0.5cm; }
322+ p, h2, h3 { orphans: 3; widows: 3; }
323+ h2, h3{ page-break-after: avoid; }
324+}
325+
htdocs/img/.gitignore+2−0
@@ -0,0 +1,2 @@
1+!.gitignore
2+
htdocs/img/alert-overlay.png+0−0
Binary file, not shown.
htdocs/index.html+61−0
@@ -0,0 +1,61 @@
1+<!doctype html>
2+<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
3+<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
4+<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
5+<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
6+<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
7+<head>
8+ <meta charset="utf-8">
9+
10+ <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
11+ Remove this if you use the .htaccess -->
12+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
13+
14+ <title>Chatroom</title>
15+ <meta name="description" content="">
16+ <meta name="author" content="@xonecas">
17+
18+ <!-- Mobile viewport optimized: j.mp/bplateviewport -->
19+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
20+
21+ <!-- CSS: implied media="all" -->
22+ <link rel="stylesheet" href="css/style.css">
23+</head>
24+
25+<body>
26+
27+
28+
29+ <div id="box" style="display: none;">
30+ <textarea id="message" placeholder="type your message" rows="1"></textarea>
31+ <span id="send" class="awesome blue">Send!</span>
32+ </div>
33+
34+ <div id="user">
35+ <p>Enter your name: <input type="text" id="nick" /></p>
36+ <span id="go" class="awesome green">GO!</span>
37+ </div>
38+
39+ <ul id="chat" style="display: none;">
40+
41+ <li id="myStub" class="hidden"></li>
42+ </ul>
43+
44+ <!-- JavaScript at the bottom for fast page loading -->
45+
46+ <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
47+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
48+ <script src="/js/libs/qwery.js"></script>
49+ <script src="/js/libs/json2.js"></script>
50+ <script src="/socket.io/socket.io.js"></script>
51+ <script src="/js/script.js"></script>
52+
53+
54+ <!--[if lt IE 7 ]>
55+ <script src="js/libs/dd_belatedpng.js"></script>
56+ <script>DD_belatedPNG.fix("img, .png_bg"); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
57+ <![endif]-->
58+
59+
60+</body>
61+</html>
htdocs/js/libs/dd_belatedpng.js+13−0
@@ -0,0 +1,13 @@
1+/**
2+* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
3+* Author: Drew Diller
4+* Email: drew.diller@gmail.com
5+* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
6+* Version: 0.0.8a
7+* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
8+*
9+* Example usage:
10+* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
11+* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
12+**/
13+var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url( …
htdocs/js/libs/jquery-1.5.1.js+8316−0
@@ -0,0 +1,8316 @@
1+/*!
2+ * jQuery JavaScript Library v1.5.1
3+ * http://jquery.com/
4+ *
5+ * Copyright 2011, John Resig
6+ * Dual licensed under the MIT or GPL Version 2 licenses.
7+ * http://jquery.org/license
8+ *
9+ * Includes Sizzle.js
10+ * http://sizzlejs.com/
11+ * Copyright 2011, The Dojo Foundation
12+ * Released under the MIT, BSD, and GPL Licenses.
13+ *
14+ * Date: Wed Feb 23 13:55:29 2011 -0500
15+ */
16+(function( window, undefined ) {
17+
18+// Use the correct document accordingly with window argument (sandbox)
19+var document = window.document;
20+var jQuery = (function() {
21+
22+// Define a local copy of jQuery
23+var jQuery = function( selector, context ) {
24+ // The jQuery object is actually just the init constructor 'enhanced'
25+ return new jQuery.fn.init( selector, context, rootjQuery );
26+ },
27+
28+ // Map over jQuery in case of overwrite
29+ _jQuery = window.jQuery,
30+
31+ // Map over the $ in case of overwrite
32+ _$ = window.$,
33+
34+ // A central reference to the root jQuery(document)
35+ rootjQuery,
36+
37+ // A simple way to check for HTML strings or ID strings
38+ // (both of which we optimize for)
39+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
40+
41+ // Check if a string has a non-whitespace character in it
42+ rnotwhite = /\S/,
43+
44+ // Used for trimming whitespace
45+ trimLeft = /^\s+/,
46+ trimRight = /\s+$/,
47+
48+ // Check for digits
49+ rdigit = /\d/,
50+
51+ // Match a standalone tag
52+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
53+
54+ // JSON RegExp
55+ rvalidchars = /^[\],:{}\s]*$/,
56+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
57+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
58+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
59+
60+ // Useragent RegExp
61+ rwebkit = /(webkit)[ \/]([\w.]+)/,
62+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
63+ rmsie = /(msie) ([\w.]+)/,
64+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
65+
66+ // Keep a UserAgent string for use with jQuery.browser
67+ userAgent = navigator.userAgent,
68+
69+ // For matching the engine and version of the browser
70+ browserMatch,
71+
72+ // Has the ready events already been bound?
73+ readyBound = false,
74+
75+ // The deferred used on DOM ready
76+ readyList,
77+
78+ // Promise methods
79+ promiseMethods = "then done fail isResolved isRejected promise".split( " " ),
80+
81+ // The ready event handler
82+ DOMContentLoaded,
83+
84+ // Save a reference to some core methods
85+ toString = Object.prototype.toString,
86+ hasOwn = Object.prototype.hasOwnProperty,
87+ push = Array.prototype.push,
88+ slice = Array.prototype.slice,
89+ trim = String.prototype.trim,
90+ indexOf = Array.prototype.indexOf,
91+
92+ // [[Class]] -> type pairs
93+ class2type = {};
94+
95+jQuery.fn = jQuery.prototype = {
96+ constructor: jQuery,
97+ init: function( selector, context, rootjQuery ) {
98+ var match, elem, ret, doc;
99+
100+ // Handle $(""), $(null), or $(undefined)
101+ if ( !selector ) {
102+ return this;
103+ }
104+
105+ // Handle $(DOMElement)
106+ if ( selector.nodeType ) {
107+ this.context = this[0] = selector;
108+ this.length = 1;
109+ return this;
110+ }
111+
112+ // The body element only exists once, optimize finding it
113+ if ( selector === "body" && !context && document.body ) {
114+ this.context = document;
115+ this[0] = document.body;
116+ this.selector = "body";
117+ this.length = 1;
118+ return this;
119+ }
120+
121+ // Handle HTML strings
122+ if ( typeof selector === "string" ) {
123+ // Are we dealing with HTML string or an ID?
124+ match = quickExpr.exec( selector );
125+
126+ // Verify a match, and that no context was specified for #id
127+ if ( match && (match[1] || !context) ) {
128+
129+ // HANDLE: $(html) -> $(array)
130+ if ( match[1] ) {
131+ context = context instanceof jQuery ? context[0] : context;
132+ doc = (context ? context.ownerDocument || context : document);
133+
134+ // If a single string is passed in and it's a single tag
135+ // just do a createElement and skip the rest
136+ ret = rsingleTag.exec( selector );
137+
138+ if ( ret ) {
139+ if ( jQuery.isPlainObject( context ) ) {
140+ selector = [ document.createElement( ret[1] ) ];
141+ jQuery.fn.attr.call( selector, context, true );
142+
143+ } else {
144+ selector = [ doc.createElement( ret[1] ) ];
145+ }
146+
147+ } else {
148+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
149+ selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
150+ }
151+
152+ return jQuery.merge( this, selector );
153+
154+ // HANDLE: $("#id")
155+ } else {
156+ elem = document.getElementById( match[2] );
157+
158+ // Check parentNode to catch when Blackberry 4.6 returns
159+ // nodes that are no longer in the document #6963
160+ if ( elem && elem.parentNode ) {
161+ // Handle the case where IE and Opera return items
162+ // by name instead of ID
163+ if ( elem.id !== match[2] ) {
164+ return rootjQuery.find( selector );
165+ }
166+
167+ // Otherwise, we inject the element directly into the jQuery object
168+ this.length = 1;
169+ this[0] = elem;
170+ }
171+
172+ this.context = document;
173+ this.selector = selector;
174+ return this;
175+ }
176+
177+ // HANDLE: $(expr, $(...))
178+ } else if ( !context || context.jquery ) {
179+ return (context || rootjQuery).find( selector );
180+
181+ // HANDLE: $(expr, context)
182+ // (which is just equivalent to: $(context).find(expr)
183+ } else {
184+ return this.constructor( context ).find( selector );
185+ }
186+
187+ // HANDLE: $(function)
188+ // Shortcut for document ready
189+ } else if ( jQuery.isFunction( selector ) ) {
190+ return rootjQuery.ready( selector );
191+ }
192+
193+ if (selector.selector !== undefined) {
194+ this.selector = selector.selector;
195+ this.context = selector.context;
196+ }
197+
198+ return jQuery.makeArray( selector, this );
199+ },
200+
201+ // Start with an empty selector
202+ selector: "",
203+
204+ // The current version of jQuery being used
205+ jquery: "1.5.1",
206+
207+ // The default length of a jQuery object is 0
208+ length: 0,
209+
210+ // The number of elements contained in the matched element set
211+ size: function() {
212+ return this.length;
213+ },
214+
215+ toArray: function() {
216+ return slice.call( this, 0 );
217+ },
218+
219+ // Get the Nth element in the matched element set OR
220+ // Get the whole matched element set as a clean array
221+ get: function( num ) {
222+ return num == null ?
223+
224+ // Return a 'clean' array
225+ this.toArray() :
226+
227+ // Return just the object
228+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
229+ },
230+
231+ // Take an array of elements and push it onto the stack
232+ // (returning the new matched element set)
233+ pushStack: function( elems, name, selector ) {
234+ // Build a new jQuery matched element set
235+ var ret = this.constructor();
236+
237+ if ( jQuery.isArray( elems ) ) {
238+ push.apply( ret, elems );
239+
240+ } else {
241+ jQuery.merge( ret, elems );
242+ }
243+
244+ // Add the old object onto the stack (as a reference)
245+ ret.prevObject = this;
246+
247+ ret.context = this.context;
248+
249+ if ( name === "find" ) {
250+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
251+ } else if ( name ) {
252+ ret.selector = this.selector + "." + name + "(" + selector + ")";
253+ }
254+
255+ // Return the newly-formed element set
256+ return ret;
257+ },
258+
259+ // Execute a callback for every element in the matched set.
260+ // (You can seed the arguments with an array of args, but this is
261+ // only used internally.)
262+ each: function( callback, args ) {
263+ return jQuery.each( this, callback, args );
264+ },
265+
266+ ready: function( fn ) {
267+ // Attach the listeners
268+ jQuery.bindReady();
269+
270+ // Add the callback
271+ readyList.done( fn );
272+
273+ return this;
274+ },
275+
276+ eq: function( i ) {
277+ return i === -1 ?
278+ this.slice( i ) :
279+ this.slice( i, +i + 1 );
280+ },
281+
282+ first: function() {
283+ return this.eq( 0 );
284+ },
285+
286+ last: function() {
287+ return this.eq( -1 );
288+ },
289+
290+ slice: function() {
291+ return this.pushStack( slice.apply( this, arguments ),
292+ "slice", slice.call(arguments).join(",") );
293+ },
294+
295+ map: function( callback ) {
296+ return this.pushStack( jQuery.map(this, function( elem, i ) {
297+ return callback.call( elem, i, elem );
298+ }));
299+ },
300+
301+ end: function() {
302+ return this.prevObject || this.constructor(null);
303+ },
304+
305+ // For internal use only.
306+ // Behaves like an Array's method, not like a jQuery method.
307+ push: push,
308+ sort: [].sort,
309+ splice: [].splice
310+};
311+
312+// Give the init function the jQuery prototype for later instantiation
313+jQuery.fn.init.prototype = jQuery.fn;
314+
315+jQuery.extend = jQuery.fn.extend = function() {
316+ var options, name, src, copy, copyIsArray, clone,
317+ target = arguments[0] || {},
318+ i = 1,
319+ length = arguments.length,
320+ deep = false;
321+
322+ // Handle a deep copy situation
323+ if ( typeof target === "boolean" ) {
324+ deep = target;
325+ target = arguments[1] || {};
326+ // skip the boolean and the target
327+ i = 2;
328+ }
329+
330+ // Handle case when target is a string or something (possible in deep copy)
331+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
332+ target = {};
333+ }
334+
335+ // extend jQuery itself if only one argument is passed
336+ if ( length === i ) {
337+ target = this;
338+ --i;
339+ }
340+
341+ for ( ; i < length; i++ ) {
342+ // Only deal with non-null/undefined values
343+ if ( (options = arguments[ i ]) != null ) {
344+ // Extend the base object
345+ for ( name in options ) {
346+ src = target[ name ];
347+ copy = options[ name ];
348+
349+ // Prevent never-ending loop
350+ if ( target === copy ) {
351+ continue;
352+ }
353+
354+ // Recurse if we're merging plain objects or arrays
355+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
356+ if ( copyIsArray ) {
357+ copyIsArray = false;
358+ clone = src && jQuery.isArray(src) ? src : [];
359+
360+ } else {
361+ clone = src && jQuery.isPlainObject(src) ? src : {};
362+ }
363+
364+ // Never move original objects, clone them
365+ target[ name ] = jQuery.extend( deep, clone, copy );
366+
367+ // Don't bring in undefined values
368+ } else if ( copy !== undefined ) {
369+ target[ name ] = copy;
370+ }
371+ }
372+ }
373+ }
374+
375+ // Return the modified object
376+ return target;
377+};
378+
379+jQuery.extend({
380+ noConflict: function( deep ) {
381+ window.$ = _$;
382+
383+ if ( deep ) {
384+ window.jQuery = _jQuery;
385+ }
386+
387+ return jQuery;
388+ },
389+
390+ // Is the DOM ready to be used? Set to true once it occurs.
391+ isReady: false,
392+
393+ // A counter to track how many items to wait for before
394+ // the ready event fires. See #6781
395+ readyWait: 1,
396+
397+ // Handle when the DOM is ready
398+ ready: function( wait ) {
399+ // A third-party is pushing the ready event forwards
400+ if ( wait === true ) {
401+ jQuery.readyWait--;
402+ }
403+
404+ // Make sure that the DOM is not already loaded
405+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
406+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
407+ if ( !document.body ) {
408+ return setTimeout( jQuery.ready, 1 );
409+ }
410+
411+ // Remember that the DOM is ready
412+ jQuery.isReady = true;
413+
414+ // If a normal DOM Ready event fired, decrement, and wait if need be
415+ if ( wait !== true && --jQuery.readyWait > 0 ) {
416+ return;
417+ }
418+
419+ // If there are functions bound, to execute
420+ readyList.resolveWith( document, [ jQuery ] );
421+
422+ // Trigger any bound ready events
423+ if ( jQuery.fn.trigger ) {
424+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
425+ }
426+ }
427+ },
428+
429+ bindReady: function() {
430+ if ( readyBound ) {
431+ return;
432+ }
433+
434+ readyBound = true;
435+
436+ // Catch cases where $(document).ready() is called after the
437+ // browser event has already occurred.
438+ if ( document.readyState === "complete" ) {
439+ // Handle it asynchronously to allow scripts the opportunity to delay ready
440+ return setTimeout( jQuery.ready, 1 );
441+ }
442+
443+ // Mozilla, Opera and webkit nightlies currently support this event
444+ if ( document.addEventListener ) {
445+ // Use the handy event callback
446+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
447+
448+ // A fallback to window.onload, that will always work
449+ window.addEventListener( "load", jQuery.ready, false );
450+
451+ // If IE event model is used
452+ } else if ( document.attachEvent ) {
453+ // ensure firing before onload,
454+ // maybe late but safe also for iframes
455+ document.attachEvent("onreadystatechange", DOMContentLoaded);
456+
457+ // A fallback to window.onload, that will always work
458+ window.attachEvent( "onload", jQuery.ready );
459+
460+ // If IE and not a frame
461+ // continually check to see if the document is ready
462+ var toplevel = false;
463+
464+ try {
465+ toplevel = window.frameElement == null;
466+ } catch(e) {}
467+
468+ if ( document.documentElement.doScroll && toplevel ) {
469+ doScrollCheck();
470+ }
471+ }
472+ },
473+
474+ // See test/unit/core.js for details concerning isFunction.
475+ // Since version 1.3, DOM methods and functions like alert
476+ // aren't supported. They return false on IE (#2968).
477+ isFunction: function( obj ) {
478+ return jQuery.type(obj) === "function";
479+ },
480+
481+ isArray: Array.isArray || function( obj ) {
482+ return jQuery.type(obj) === "array";
483+ },
484+
485+ // A crude way of determining if an object is a window
486+ isWindow: function( obj ) {
487+ return obj && typeof obj === "object" && "setInterval" in obj;
488+ },
489+
490+ isNaN: function( obj ) {
491+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
492+ },
493+
494+ type: function( obj ) {
495+ return obj == null ?
496+ String( obj ) :
497+ class2type[ toString.call(obj) ] || "object";
498+ },
499+
500+ isPlainObject: function( obj ) {
501+ // Must be an Object.
502+ // Because of IE, we also have to check the presence of the constructor property.
503+ // Make sure that DOM nodes and window objects don't pass through, as well
504+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
505+ return false;
506+ }
507+
508+ // Not own constructor property must be Object
509+ if ( obj.constructor &&
510+ !hasOwn.call(obj, "constructor") &&
511+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
512+ return false;
513+ }
514+
515+ // Own properties are enumerated firstly, so to speed up,
516+ // if last one is own, then all properties are own.
517+
518+ var key;
519+ for ( key in obj ) {}
520+
521+ return key === undefined || hasOwn.call( obj, key );
522+ },
523+
524+ isEmptyObject: function( obj ) {
525+ for ( var name in obj ) {
526+ return false;
527+ }
528+ return true;
529+ },
530+
531+ error: function( msg ) {
532+ throw msg;
533+ },
534+
535+ parseJSON: function( data ) {
536+ if ( typeof data !== "string" || !data ) {
537+ return null;
538+ }
539+
540+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
541+ data = jQuery.trim( data );
542+
543+ // Make sure the incoming data is actual JSON
544+ // Logic borrowed from http://json.org/json2.js
545+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
546+ .replace(rvalidtokens, "]")
547+ .replace(rvalidbraces, "")) ) {
548+
549+ // Try to use the native JSON parser first
550+ return window.JSON && window.JSON.parse ?
551+ window.JSON.parse( data ) :
552+ (new Function("return " + data))();
553+
554+ } else {
555+ jQuery.error( "Invalid JSON: " + data );
556+ }
557+ },
558+
559+ // Cross-browser xml parsing
560+ // (xml & tmp used internally)
561+ parseXML: function( data , xml , tmp ) {
562+
563+ if ( window.DOMParser ) { // Standard
564+ tmp = new DOMParser();
565+ xml = tmp.parseFromString( data , "text/xml" );
566+ } else { // IE
567+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
568+ xml.async = "false";
569+ xml.loadXML( data );
570+ }
571+
572+ tmp = xml.documentElement;
573+
574+ if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
575+ jQuery.error( "Invalid XML: " + data );
576+ }
577+
578+ return xml;
579+ },
580+
581+ noop: function() {},
582+
583+ // Evalulates a script in a global context
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/jquery-1.5.1.min.js+16−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/json2.js+480−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/modernizr-1.7.min.js+2−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/qwery.js+222−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/mylibs/.gitignore+2−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/plugins.js+15−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/script.js+80−0
Cut short: this commit's diff is over 1000 lines.
humans.txt+43−0
Cut short: this commit's diff is over 1000 lines.
lib/hash.js+39−0
Cut short: this commit's diff is over 1000 lines.
robots.txt+5−0
Cut short: this commit's diff is over 1000 lines.
server.js+136−0
Cut short: this commit's diff is over 1000 lines.