[pypy-svn] r38843 - in pypy/dist/pypy/translator/js/examples: . data

fijal at codespeak.net fijal at codespeak.net
Wed Feb 14 15:56:55 CET 2007


Author: fijal
Date: Wed Feb 14 15:56:54 2007
New Revision: 38843

Modified:
   pypy/dist/pypy/translator/js/examples/data/index.html
   pypy/dist/pypy/translator/js/examples/over_client.py
   pypy/dist/pypy/translator/js/examples/overmind.py
Log:
A link to b'n'b (need a check if it's running :)


Modified: pypy/dist/pypy/translator/js/examples/data/index.html
==============================================================================
--- pypy/dist/pypy/translator/js/examples/data/index.html	(original)
+++ pypy/dist/pypy/translator/js/examples/data/index.html	Wed Feb 14 15:56:54 2007
@@ -16,9 +16,16 @@
   </div>
   <div>
   <h3>Remote terminal:</h3>
-  <p>Fully ANSI-complaint remote terminal session:
-  <a href="javascript:launch_terminal()">Launch one for me</a>
-  <a href="source_link_here">Source</a>
+    <p>Fully ANSI-complaint remote terminal session:
+    <a href="javascript:launch_terminal()">Launch one for me</a>
+    <a href="source_link_here">Source</a>
+  </p>
+  <h3>Bub'n'Bros JavaScript version</h3>
+  <p>
+    This is a working b'n'b client. It's kind of slow (blame louse browsers),
+    but usable. <b>WARNING! If you're using the firebug, please disable it,
+   it's a great tool, but chockes a bit on this demo</b><br/>
+   <a href="/bnb"/>Demo</a>
   </p>
   </div>
 </body>

Modified: pypy/dist/pypy/translator/js/examples/over_client.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/over_client.py	(original)
+++ pypy/dist/pypy/translator/js/examples/over_client.py	Wed Feb 14 15:56:54 2007
@@ -11,3 +11,8 @@
 
 def launch_console():
     exported_methods.launch_console(callback)
+
+def bnb_redirect():
+    loc = dom.window.location
+    new_loc = loc.protocol + "//" + loc.hostname + ":7070"
+    loc.assign(new_loc)

Modified: pypy/dist/pypy/translator/js/examples/overmind.py
==============================================================================
--- pypy/dist/pypy/translator/js/examples/overmind.py	(original)
+++ pypy/dist/pypy/translator/js/examples/overmind.py	Wed Feb 14 15:56:54 2007
@@ -14,7 +14,7 @@
 import os
 import py
 
-FUNCTION_LIST = ['launch_console']
+FUNCTION_LIST = ['launch_console', 'bnb_redirect']
 TIMEOUT = 300
 pids = []
 
@@ -60,6 +60,17 @@
         return "text/javascript", source
     source_js.exposed = True
 
+    def bnb(self):
+        return '''
+        <html>
+           <head>
+              <script src="source.js"></script>
+           </head>
+           <body onload="bnb_redirect()">
+           </body>
+        </html>'''
+    bnb.exposed = True
+
 if __name__ == '__main__':
     try:
         addr = ('', 8008)



More information about the Pypy-commit mailing list