<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><language>en-us</language><copyright>Copyright 2006</copyright><managingEditor>palrich@gmail.com</managingEditor><webMaster>palrich@gmail.com</webMaster><lastBuildDate>Fri, 10 Sep 2010 21:43:28 +0000</lastBuildDate><pubDate>Fri, 10 Sep 2010 21:43:28 +0000</pubDate><ttl>60</ttl><generator>WeirdLooking.com</generator><link>http://www.weirdlooking.com/</link><description>WeirdLooking.com: Michael Barton's Blog</description><title>WeirdLooking.com: Michael Barton's Blog</title><image><url>http://www.weirdlooking.com/images/feed.png</url><title>WeirdLooking.com: Michael Barton's Blog</title><link>http://www.weirdlooking.com/</link></image><item><title>javascript mud client 2</title><dc:creator>Michael Barton</dc:creator><link>http://www.weirdlooking.com/blog/javascript-mud-client-2</link><guid>http://www.weirdlooking.com/blog/javascript-mud-client-2</guid><pubDate>Tue, 28 Mar 2006 17:04:14 +0000</pubDate><description>&lt;div style=&quot;float: right; margin: 2px; padding: 2px; border: solid 1px #555555;&quot;&gt;&lt;a href=&quot;//www.weirdlooking.com/blog/54/mudhtml.png&quot;&gt;&lt;img src=&quot;//www.weirdlooking.com/blog/54/mudhtml.png/200:*&quot; alt=&quot;Click to enlargen&quot; /&gt;&lt;/a&gt;&lt;/div&gt;I woke up early this morning and decided to start from scratch on my javascript mud client.&amp;nbsp; After writing the single worst implementation of a web server ever (it would have gone nicely with my networking final project, which included the single worst implementation of a web client ever), I was able to get it working.&lt;br /&gt;&lt;br /&gt;Basically, I rewrote the MUD to accept HTTP requests and wrap a javascript call around the output from each pulse.&amp;nbsp; Taking &lt;a href=&quot;http://www.muujware.com/matthew/&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.muujware.com%2Fmatthew%2F) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;Matt&lt;/a&gt;&amp;#39;s advice, I decided to use &amp;lt;b&amp;gt; tags with short class names, rather than the &amp;lt;span style=&amp;rdquo;color:&amp;#8230;&amp;rdquo;&amp;gt; stuff I was doing before.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Example (mud prompt)&lt;/span&gt;: &lt;code&gt;&amp;lt;script&amp;gt;parent.push('&amp;lt;br&amp;gt;&amp;lt;b class=g&amp;gt;&amp;amp;lt;20hp 100m 100mv&amp;amp;gt; &amp;lt;b class=X&amp;gt;');&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The browser downloads this &amp;ldquo;page&amp;rdquo; inside a hidden &amp;lt;iframe&amp;gt; (using the hack I &lt;a href=&quot;http://www.weirdlooking.com/blog/53&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.weirdlooking.com%2Fblog%2F53) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;previously posted&lt;/a&gt; for Internet Explorer, just a plain iframe for FF).&amp;nbsp; The push() function in the frame&amp;rsquo;s parent creates a new &amp;lt;pre&amp;gt; tag, stuffs the argument text inside it, then appends it to the display &amp;lt;div&amp;gt;.&amp;nbsp; Then the div&amp;rsquo;s scroll is set to the bottom.&lt;br /&gt;&lt;br /&gt;Mud input uses a form submit handler, which takes the value of the &amp;lt;input&amp;gt; and sticks it into an XMLHttpRequest, which is sent to the aforementioned worst web server implementation ever.&lt;br /&gt;&lt;br /&gt;I hacked it into &lt;a href=&quot;http://www.flugh.com/quickmud/&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.flugh.com%2Fquickmud%2F) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;QuickMUD&lt;/a&gt; rather than my own code base so that, should I ever decide to clean it up, other people can use it.&lt;br /&gt;&lt;br /&gt;Okay, so it&amp;rsquo;s pretty trivial.&amp;nbsp; But it was fun.</description><category>computers and internet</category><category>javascript</category><category>mud</category><comments>http://www.weirdlooking.com/blog/javascript-mud-client-2#comments</comments><wfw:comment>http://www.weirdlooking.com/comments/54</wfw:comment><wfw:commentRss>http://www.weirdlooking.com/rss/comments/54</wfw:commentRss><slash:comments>7</slash:comments></item></channel></rss>