Compare commits

...
5 Commits
Author SHA1 Message Date
paris 28b553caa6 Bump version to 0.18 2014-09-15 13:52:20 +00:00
paris 22ff176c6a Fix #5 2014-09-15 13:51:42 +00:00
paris d24e00554d Tiny README updates 2014-09-10 11:15:24 +00:00
paris bc67c788d2 Bump version to 0.17 2014-09-10 11:09:59 +00:00
paris 3f455f90d9 Fix #4 2014-09-10 11:09:23 +00:00
8 changed files with 4669 additions and 4623 deletions
+5 -7
View File
@@ -2,20 +2,18 @@
Xterm.js is a full xterm clone, written completely in JavaScript. Xterm.js is a full xterm clone, written completely in JavaScript.
Xterm.js supplies a modular, event-based interface that lets developers build addons and themes that augment Xterm.js supplies a modular, event-based interface that lets developers build addons and themes that augment the experience of running a fully-featured terminal inside the browser.
the experience of running a fully-feature terminal inside the browser.
Xterm.js serves as the foundation for the terminal found at www.sourcelair.com. Xterm.js serves as foundation for the terminal found at www.sourcelair.com.
![xterm.js screenshot](docs/screenshot.png) ![xterm.js screenshot](docs/screenshot.png)
### Contribution and License Agreement ### Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work.
## License ## License
Copyright (c) 2014, SourceLair, Limited (www.sourcelair.com) (MIT License) Copyright (c) 2014, SourceLair, Ltd (www.sourcelair.com) (MIT License)
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+17 -2
View File
@@ -5,7 +5,21 @@
* The bidirectional argument indicates, whether the terminal should * The bidirectional argument indicates, whether the terminal should
* send data to the socket as well and is true, by default. * send data to the socket as well and is true, by default.
*/ */
Terminal.prototype.attach = function (socket, bidirectional) {
(function (attach) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], attach);
} else {
/*
* Plain browser environment
*/
attach(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.attach = function (socket, bidirectional) {
var term = this; var term = this;
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional; bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
@@ -20,4 +34,5 @@ Terminal.prototype.attach = function (socket, bidirectional) {
socket.send(data); socket.send(data);
}); });
} }
} };
});
+15 -1
View File
@@ -11,7 +11,20 @@
* terminal row and truncate its width with the current number * terminal row and truncate its width with the current number
* of columns) * of columns)
*/ */
Terminal.prototype.fit = function () { (function (fit) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], fit);
} else {
/*
* Plain browser environment
*/
fit(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.fit = function () {
var container = this.rowContainer, var container = this.rowContainer,
subjectRow = this.rowContainer.firstElementChild, subjectRow = this.rowContainer.firstElementChild,
rows, rows,
@@ -43,3 +56,4 @@ Terminal.prototype.fit = function () {
this.resize(cols, rows); this.resize(cols, rows);
}; };
});
+16 -2
View File
@@ -10,7 +10,20 @@
* If the `fullscreen` argument has not been supplied, the * If the `fullscreen` argument has not been supplied, the
* fullscreen mode is being toggled. * fullscreen mode is being toggled.
*/ */
Terminal.prototype.toggleFullscreen = function (fullscreen) { (function (fullscreen) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], fullscreen);
} else {
/*
* Plain browser environment
*/
fullscreen(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.toggleFullscreen = function (fullscreen) {
var fn; var fn;
if (typeof fullscreen == 'undefined') { if (typeof fullscreen == 'undefined') {
@@ -22,4 +35,5 @@ Terminal.prototype.toggleFullscreen = function (fullscreen) {
} }
this.element.classList[fn]('fullscreen'); this.element.classList[fn]('fullscreen');
} };
});
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "xterm.js", "name": "xterm.js",
"version": "0.16", "version": "0.18",
"ignore": ["demo", "docs", "test", ".gitignore"] "ignore": ["demo", "docs", "test", ".gitignore"]
} }
+2 -2
View File
@@ -51,9 +51,9 @@ copyright = u'2014, SourceLair Limited'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.16' version = '0.18'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.16 Alpha' release = '0.18 Alpha'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
+1
View File
@@ -45,6 +45,7 @@
.xterm .terminal-cursor { .xterm .terminal-cursor {
background-color: #fff; background-color: #fff;
color: #000;
} }
.xterm .xterm-helpers { .xterm .xterm-helpers {
+17 -13
View File
@@ -31,8 +31,20 @@
* other features. * other features.
*/ */
;(function() { (function (xterm) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define([], xterm);
} else {
/*
* Plain browser environment
*/
this.Xterm = xterm.call(this);
this.Terminal = this.Xterm; /* Backwards compatibility with term.js */
}
})(function() {
/** /**
* Terminal Emulation References: * Terminal Emulation References:
* http://vt100.net/ * http://vt100.net/
@@ -50,8 +62,7 @@
* Shared * Shared
*/ */
var window = this var window = this, document = this.document;
, document = this.document;
/** /**
* EventEmitter * EventEmitter
@@ -4763,12 +4774,5 @@ Terminal.on = on;
Terminal.off = off; Terminal.off = off;
Terminal.cancel = cancel; Terminal.cancel = cancel;
if (typeof module !== 'undefined') { return Terminal;
module.exports = Terminal; });
} else {
this.Terminal = Terminal;
}
}).call(function() {
return this || (typeof window !== 'undefined' ? window : global);
}());