pad

minimal etherpad alternative  https://pad.ce9e.org
git clone https://git.ce9e.org/pad.git

commit
f77008f4c2c75907e489b530b60208443d4c5799
parent
52180a490b275fda9280f22e22de84d8eb7ed361
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-12-09 10:02
unapply myChanges in optimize

Diffstat

M static/pad.js 10 +++++++++-

1 files changed, 9 insertions, 1 deletions


diff --git a/static/pad.js b/static/pad.js

@@ -77,7 +77,15 @@ var handleMessage = function(msg) {
   77    77 };
   78    78 
   79    79 var optimize = function(lastEventId) {
   80    -1 	var change = diff.diff('', el.value, 3);
   -1    80 	var change;
   -1    81 	var text = el.value;
   -1    82 	var myChanges = [].concat(stagedChanges, localChanges);
   -1    83 
   -1    84 	for (change of myChanges.slice().reverse()) {
   -1    85 		text = diff.unapply(text, change);
   -1    86 	}
   -1    87 
   -1    88 	change = diff.diff('', text, 3);
   81    89 	var data = [id, 'changes', [change]];
   82    90 	fetch(url, {
   83    91 		method: 'PUT',