~mrooney/etherpad/ubuntu

« back to all changes in this revision

Viewing changes to trunk/trunk/infrastructure/ace/www/testcode.js

  • Committer: Aaron Iba
  • Date: 2009-12-18 07:40:23 UTC
  • Revision ID: hg-v1:a9f8774a2e00cc15b35857471fecea17f649e3c9
initial code push

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function getTestCode() {
 
2
  var testCode = [
 
3
'/* appjet:version 0.1 */',
 
4
'(function(){',
 
5
'/*',
 
6
' * jQuery 1.2.1 - New Wave Javascript',
 
7
' *',
 
8
' * Copyright (c) 2007 John Resig (jquery.com)',
 
9
' * Dual licensed under the MIT (MIT-LICENSE.txt)',
 
10
' * and GPL (GPL-LICENSE.txt) licenses.',
 
11
' *',
 
12
' * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $',
 
13
' * $Rev: 3353 $',
 
14
' */',
 
15
'',
 
16
'// Map over jQuery in case of overwrite',
 
17
'if ( typeof jQuery != "undefined" )',
 
18
'       var _jQuery = jQuery;',
 
19
'',
 
20
'var jQuery = window.jQuery = function(selector, context) {',
 
21
'       // If the context is a namespace object, return a new object',
 
22
'       return this instanceof jQuery ?',
 
23
'               this.init(selector, context) :',
 
24
'               new jQuery(selector, context);',
 
25
'};',
 
26
'',
 
27
'// Map over the $ in case of overwrite',
 
28
'if ( typeof $ != "undefined" )',
 
29
'       var _$ = $;',
 
30
'       ',
 
31
'// Map the jQuery namespace to the \'$\' one',
 
32
'window.$ = jQuery;',
 
33
'',
 
34
'var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;'].join('\n');
 
35
  return testCode;
 
36
}