Skip to content

Commit be84274

Browse files
committed
JS LZ compress changes/content before sending
1 parent cba7f06 commit be84274

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/ice-coder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,10 +2591,10 @@ var ICEcoder = {
25912591

25922592
// Save as events need to send all contents
25932593
if (item.indexOf('action=saveAs')>0) {
2594-
xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
2594+
xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.LZString.compressToBase64(top.document.getElementById('saveTemp1').value)));
25952595
// Save evens can just sent the changes
25962596
} else if (item.indexOf('action=save')>0) {
2597-
xhr.send('timeStart='+timeStart+'&file='+file+'&changes='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
2597+
xhr.send('timeStart='+timeStart+'&file='+file+'&changes='+encodeURIComponent(top.LZString.compressToBase64(top.document.getElementById('saveTemp1').value)));
25982598
// Another type of event
25992599
} else {
26002600
xhr.send('timeStart='+timeStart+'&file='+file);
@@ -3894,4 +3894,4 @@ var ICEcoder = {
38943894
top.ICEcoder.focus(top.ICEcoder.editorFocusInstance.indexOf('diff') > -1 ? true : false);
38953895
}
38963896
}
3897-
};
3897+
};

lib/ice-coder.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)