1+ diff --git a/node_modules/@hackmd/ot/lib/client.js b/node_modules/@hackmd/ot/lib/client.js
2+ index 7ee19fd..8dfc6c6 100644
3+ --- a/node_modules/@hackmd/ot/lib/client.js
4+ +++ b/node_modules/@hackmd/ot/lib/client.js
5+ @@ -1,9 +1,5 @@
6+ // translation of https://github.com/djspiewak/cccp/blob/master/agent/src/main/scala/com/codecommit/cccp/agent/state.scala
7+
8+ - if (typeof ot === 'undefined') {
9+ - var ot = {};
10+ - }
11+ -
12+ ot.Client = (function (global) {
13+ 'use strict';
14+
15+ diff --git a/node_modules/@hackmd/ot/lib/editor-client.js b/node_modules/@hackmd/ot/lib/editor-client.js
16+ index 6e57349..a2d6632 100644
17+ --- a/node_modules/@hackmd/ot/lib/editor-client.js
18+ +++ b/node_modules/@hackmd/ot/lib/editor-client.js
19+ @@ -356,3 +356,9 @@ ot.EditorClient = (function () {
20+
21+ return EditorClient;
22+ }());
23+ +
24+ +
25+ + if (typeof module === 'object') {
26+ + module.exports = ot.EditorClient;
27+ + }
28+ +
129diff --git a/node_modules/@hackmd/ot/lib/index.js b/node_modules/@hackmd/ot/lib/index.js
230index 0b16a6b..ad64c70 100644
331--- a/node_modules/@hackmd/ot/lib/index.js
@@ -9,3 +37,80 @@ index 0b16a6b..ad64c70 100644
937- exports.scriptsDir = require("path").resolve(__dirname, "../") + "/dist";
1038+ // exports.scriptsDir = require("path").resolve(__dirname, "../") + "/dist";
1139
40+ diff --git a/node_modules/@hackmd/ot/lib/selection.js b/node_modules/@hackmd/ot/lib/selection.js
41+ index 72bf8bd..a5ddafa 100644
42+ --- a/node_modules/@hackmd/ot/lib/selection.js
43+ +++ b/node_modules/@hackmd/ot/lib/selection.js
44+ @@ -1,8 +1,3 @@
45+ - if (typeof ot === 'undefined') {
46+ - // Export for browsers
47+ - var ot = {};
48+ - }
49+ -
50+ ot.Selection = (function (global) {
51+ 'use strict';
52+
53+ diff --git a/node_modules/@hackmd/ot/lib/server.js b/node_modules/@hackmd/ot/lib/server.js
54+ index 9988a34..bd89164 100644
55+ --- a/node_modules/@hackmd/ot/lib/server.js
56+ +++ b/node_modules/@hackmd/ot/lib/server.js
57+ @@ -1,7 +1,3 @@
58+ - if (typeof ot === 'undefined') {
59+ - var ot = {};
60+ - }
61+ -
62+ ot.Server = (function (global) {
63+ 'use strict';
64+
65+ diff --git a/node_modules/@hackmd/ot/lib/simple-text-operation.js b/node_modules/@hackmd/ot/lib/simple-text-operation.js
66+ index 6db296e..592eee1 100644
67+ --- a/node_modules/@hackmd/ot/lib/simple-text-operation.js
68+ +++ b/node_modules/@hackmd/ot/lib/simple-text-operation.js
69+ @@ -1,8 +1,3 @@
70+ - if (typeof ot === 'undefined') {
71+ - // Export for browsers
72+ - var ot = {};
73+ - }
74+ -
75+ ot.SimpleTextOperation = (function (global) {
76+
77+ var TextOperation = global.ot ? global.ot.TextOperation : require('./text-operation');
78+ diff --git a/node_modules/@hackmd/ot/lib/text-operation.js b/node_modules/@hackmd/ot/lib/text-operation.js
79+ index d546849..7d793dc 100644
80+ --- a/node_modules/@hackmd/ot/lib/text-operation.js
81+ +++ b/node_modules/@hackmd/ot/lib/text-operation.js
82+ @@ -1,8 +1,3 @@
83+ - if (typeof ot === 'undefined') {
84+ - // Export for browsers
85+ - var ot = {};
86+ - }
87+ -
88+ ot.TextOperation = (function () {
89+ 'use strict';
90+
91+ diff --git a/node_modules/@hackmd/ot/lib/undo-manager.js b/node_modules/@hackmd/ot/lib/undo-manager.js
92+ index 19e89f1..96eda4a 100644
93+ --- a/node_modules/@hackmd/ot/lib/undo-manager.js
94+ +++ b/node_modules/@hackmd/ot/lib/undo-manager.js
95+ @@ -1,8 +1,3 @@
96+ - if (typeof ot === 'undefined') {
97+ - // Export for browsers
98+ - var ot = {};
99+ - }
100+ -
101+ ot.UndoManager = (function () {
102+ 'use strict';
103+
104+ diff --git a/node_modules/@hackmd/ot/lib/wrapped-operation.js b/node_modules/@hackmd/ot/lib/wrapped-operation.js
105+ index 91050f4..8dd5dd5 100644
106+ --- a/node_modules/@hackmd/ot/lib/wrapped-operation.js
107+ +++ b/node_modules/@hackmd/ot/lib/wrapped-operation.js
108+ @@ -1,8 +1,3 @@
109+ - if (typeof ot === 'undefined') {
110+ - // Export for browsers
111+ - var ot = {};
112+ - }
113+ -
114+ ot.WrappedOperation = (function (global) {
115+ 'use strict';
116+
0 commit comments