From 523ff9908ff2938cf935ee82ebbf57a751a1397e Mon Sep 17 00:00:00 2001 From: paris Date: Sun, 4 Jan 2015 15:45:26 +0200 Subject: [PATCH] [addon linkify] Set up proper initialization of add-on - Also created a demo page for the addon --- addons/linkify/index.html | 36 ++++++++++++++++++++++++++++++++++++ addons/linkify/linkify.js | 11 +++++++++++ 2 files changed, 47 insertions(+) create mode 100644 addons/linkify/index.html diff --git a/addons/linkify/index.html b/addons/linkify/index.html new file mode 100644 index 00000000..5f429326 --- /dev/null +++ b/addons/linkify/index.html @@ -0,0 +1,36 @@ + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/addons/linkify/linkify.js b/addons/linkify/linkify.js index 022f89ad..4bc173c9 100644 --- a/addons/linkify/linkify.js +++ b/addons/linkify/linkify.js @@ -1,4 +1,15 @@ (function (linkify) { + if (typeof define == 'function') { + /* + * Require.js is available + */ + define(['../../src/xterm'], linkify); + } else { + /* + * Plain browser environment + */ + linkify(this.Xterm); + } })(function (Xterm) { Xterm.prototype.linkify = function () { var rows = this.rowContainer.children,