Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
watch-my-terminal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parse in the client too, limit to 50fps
[watch-my-terminal.git]
/
terminal.coffee
diff --git
a/terminal.coffee
b/terminal.coffee
index
34c7515
..
c7dbd7f
100644
(file)
--- a/
terminal.coffee
+++ b/
terminal.coffee
@@
-1,5
+1,11
@@
-async = require 'async'
-fs = require 'fs'
+# this file is used by the client and server.
+
+# work around lack of module system in the browser:
+if exports?
+ my_exports = exports
+else
+ window.terminal = {}
+ my_exports = window.terminal
class Terminal
# public:
class Terminal
# public:
@@
-191,5
+197,5
@@
class Terminal
return -1 unless parts?
return parts[0].length
return -1 unless parts?
return parts[0].length
-exports.new = (width, height) ->
+my_exports.new = (width, height) ->
return new Terminal width, height
return new Terminal width, height