<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -75,7 +75,7 @@
 (defservlet repl-servlet
   (GET &quot;/&quot;
     (show-repl))
-  (GET &quot;/repl&quot;
+  (POST &quot;/repl&quot;
     (eval-repl-cmd session (params :cmd)))
   (GET &quot;/*&quot;
     (or (serve-file (route :*))</diff>
      <filename>ajax_repl.clj</filename>
    </modified>
    <modified>
      <diff>@@ -25,63 +25,30 @@
 // Modified by James Reeves to support a Clojure REPL.
 // Original Ruby version at: http://tryruby.hobix.com/
 
-/* Repl running moush */
 MouseApp.Repl = function(element, options) {
   this.element = $(element);
   this.setOptions(options);
-  if ( this.options.init ) {
+
+  if (this.options.init) {
       this.init = this.options.init;
   }
   this.initWindow();
   this.setup();
-  this.replInit = false;
 };
 
 $.extend(MouseApp.Repl.prototype, MouseApp.Terminal.prototype, {
-    cmdToQuery: function(cmd) {
-        return &quot;cmd=&quot; + escape(cmd.replace(/&amp;lt;/g, '&lt;').replace(/&amp;gt;/g, '&gt;').
-            replace(/&amp;amp;/g, '&amp;').replace(/\r?\n/g, &quot;\n&quot;)).replace(/\+/g, &quot;%2B&quot;);
-    },
-
     fireOffCmd: function(cmd, func) {
-      var repl = this;
-        if (!this.replInit)
-        {
-          $.ajax({url: this.options.replUrl + &quot;?&quot; + this.cmdToQuery(&quot;!INIT!REPL!&quot;), type: &quot;GET&quot;,
-            complete: (function(r) { repl.replInit = true; repl.fireOffCmd(cmd, func); })});
-        }
-        else
-        {
-          $.ajax({url: this.options.replUrl + &quot;?&quot; + this.cmdToQuery(cmd), type: &quot;GET&quot;, 
-            complete: func});
-        }
+        $.ajax({
+            type: &quot;POST&quot;,
+            url:  this.options.replUrl,
+            data: {cmd: cmd},
+            complete: func
+        });
     },
 
     reply: function(str) {
-        var raw = str.replace(/\033\[(\d);(\d+)m/g, '');
-        if (str != &quot;..&quot;) {
-            if ( str[str.length - 1] != &quot;\n&quot; ) {
-                str += &quot;\n&quot;;
-            }
-            js_payload = /\033\[1;JSm(.*)\033\[m/;
-            js_in = str.match(js_payload);
-            if (js_in) {
-                try {
-                    js_in = eval(js_in[1]);
-                } catch (e) {}
-                str = str.replace(js_payload, '');
-            }
-            var pr_re = new RegExp(&quot;(^|\\n)=&gt;&quot;);
-            if ( str.match( pr_re ) ) {
-              str = str.replace(new RegExp(&quot;(^|\\n)=&gt;&quot;), &quot;$1\033[1;34m=&gt;\033[m&quot;);
-            } else {
-              str = str.replace(new RegExp(&quot;(^|\\n)= (.+?) =&quot;), &quot;$1\033[1;33m$2\033[m&quot;);
-            }
-            this.write(str);
-            this.prompt();
-        } else {
-            this.prompt(&quot;\033[1;32m..\033[m&quot;, true);
-        }
+        this.write(str + &quot;\n&quot;);
+        this.prompt();
     },
 
     onKeyCtrld: function() {
@@ -105,7 +72,9 @@ $.extend(MouseApp.Repl.prototype, MouseApp.Terminal.prototype, {
                 this.prompt();
             } else {
                 var term = this;
-                this.fireOffCmd(cmd, (function(r) { term.reply(r.responseText ? r.responseText : ''); }));
+                this.fireOffCmd(cmd, function(r) {
+                    term.reply(r.responseText ? r.responseText : '');
+                });
             }
         } else {
             this.prompt();</diff>
      <filename>public/js/mouserepl_2.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,37 +1,11 @@
-//
-// Copyright (c) 2008 why the lucky stiff
-// 
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the &quot;Software&quot;), to deal in the Software without restriction,
-// including without limitation the rights to use, copy, modify, merge,
-// publish, distribute, sublicense, and/or sell copies of the Software,
-// and to permit persons to whom the Software is furnished to do so,
-// subject to the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF
-// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-// SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
-// OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
+// Start Clojure REPL when document has loaded
 
-// Modified by James Reeves to support a Clojure REPL.
-// Original Ruby version at: http://tryruby.hobix.com/
-
-window.onload = function() {
-    window.repl = new MouseApp.Repl('#repl', {
+$(function() {
+    new MouseApp.Repl(&quot;#repl&quot;, {
         columns: 80,
         rows: 40,
-        name: 'REPL',
-        greeting: &quot;Clojure&quot;,
-        ps: '\033[1;31m&gt;&gt;\033[m',
-        replUrl: '/repl'
+        replUrl: &quot;/repl&quot;,
+        ps: &quot;=&gt;&quot;,
+        greeting: &quot;Clojure&quot;
     });
-}
+});</diff>
      <filename>public/js/repl.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1143a46c26346baf155a73ae6f5791b3f7f95aef</id>
    </parent>
  </parents>
  <author>
    <name>weavejester</name>
    <email>jreeves@weavejester.com</email>
  </author>
  <url>http://github.com/weavejester/clojure-over-ajax/commit/5b89241028e4504c3f9b0d5fa735ff3d0604735b</url>
  <id>5b89241028e4504c3f9b0d5fa735ff3d0604735b</id>
  <committed-date>2009-01-28T17:06:12-08:00</committed-date>
  <authored-date>2009-01-28T17:06:12-08:00</authored-date>
  <message>Cut out a lot of code, rewrote repl.js from scratch</message>
  <tree>e2304131edb427aa6e524c6ca649f96ba59960c8</tree>
  <committer>
    <name>weavejester</name>
    <email>jreeves@weavejester.com</email>
  </committer>
</commit>
