Skip to content

Commit 4e12f9d

Browse files
committed
Update
1 parent 510c439 commit 4e12f9d

File tree

9 files changed

+255
-252
lines changed

9 files changed

+255
-252
lines changed

src/html/modals/content/rate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ <h3 class="text-center">Free, From Now Until Forever!</h3>
33
<p class="text-center"></p>
44
<p class="text-center">
55
CodePad was built to help the developer community on ChromeOS. It's free for anyone to use and/or
6-
modify and that part will never change. CodePad was built for the community.
6+
modify and that part will never change.
77
</p>
88
<p class="text-center">
9-
However if you do enjoy CodePad and find it useful, please consider leaving a small &euro;0.25c donation. It
9+
However if you do enjoy my work and find it useful, please consider leaving a small &euro;0.25c donation. It
1010
would be greatly appreciated.
1111
</p>
1212
<p class="text-center">

src/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function () {
22

3-
var runtime = function (appWindow, launchData, isRestart) {
3+
let runtime = function (appWindow, launchData, isRestart) {
44
appWindow.contentWindow.launchData = launchData;
55
appWindow.contentWindow.__MGA__bRestart = isRestart
66
};

src/js/events.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ $(document).ready(function () {
44
/// Globals and initializations
55
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
66

7-
var Editors = new EditorsHandler();
8-
var Modals = new ModalsHandler();
9-
var IdeSettings = new IdeSettingsHandler();
10-
var Sidebar = new SidebarHandler();
11-
var Notifications = new NotificationsHandler();
12-
var Files = new FilesHandler();
7+
let Editors = new EditorsHandler();
8+
let Modals = new ModalsHandler();
9+
let IdeSettings = new IdeSettingsHandler();
10+
let Sidebar = new SidebarHandler();
11+
let Notifications = new NotificationsHandler();
12+
let Files = new FilesHandler();
1313

1414
Notifications.init();
1515
Files.init(Notifications);
@@ -46,8 +46,8 @@ $(document).ready(function () {
4646
// Push the template into the modal before showing it
4747
$(document).on('show.bs.modal', '.modal', function (e) {
4848

49-
var $relTgt = $(e.relatedTarget);
50-
var callback = function () {
49+
let $relTgt = $(e.relatedTarget);
50+
let callback = function () {
5151
};
5252

5353
if ($relTgt.hasClass('modal-ide-settings') || $relTgt.hasClass('modal-ide-appearance')) {
@@ -79,7 +79,7 @@ $(document).ready(function () {
7979
// Remove the template from the modal after closing it
8080
$(document).on('hide.bs.modal', '.modal', function (e) {
8181
Modals.onHideBs(e.currentTarget);
82-
var aceEditor = Editors.getCurrentEditor();
82+
let aceEditor = Editors.getCurrentEditor();
8383
if (typeof aceEditor !== typeof undefined) {
8484
aceEditor.focus();
8585
}
@@ -106,7 +106,7 @@ $(document).ready(function () {
106106
// New tab
107107
$(document).on('click', '.action-add-tab', function () {
108108

109-
var fileType = $(this).attr('data-type');
109+
let fileType = $(this).attr('data-type');
110110
if (typeof fileType === typeof undefined || !fileType) {
111111
fileType = Editors.defaultFileExt;
112112
}
@@ -117,8 +117,8 @@ $(document).ready(function () {
117117
// Save file
118118
$(document).on('click', '.action-save', function () {
119119

120-
var attr = $(this).attr('data-idx');
121-
var idx = (typeof attr !== typeof undefined && attr !== false) ? attr : Editors.currentIdx;
120+
let attr = $(this).attr('data-idx');
121+
let idx = (typeof attr !== typeof undefined && attr !== false) ? attr : Editors.currentIdx;
122122

123123
Editors.onSaveFile(idx);
124124
});
@@ -167,7 +167,7 @@ $(document).ready(function () {
167167

168168
// Rename file
169169
$(document).on('_file.rename', function (e) {
170-
var callback = function (fileEntry) {
170+
let callback = function (fileEntry) {
171171
Files.fileRename(fileEntry, e.oldFileName, e.newFileName).then(function (fileEntry) {
172172
if (typeof fileEntry !== typeof undefined) {
173173
Editors.onRenameFile(e.idx, fileEntry);
@@ -186,7 +186,7 @@ $(document).ready(function () {
186186
});
187187
};
188188

189-
var fileEntry = Editors.getEditorDataObj(e.idx);
189+
let fileEntry = Editors.getEditorDataObj(e.idx);
190190
if (typeof fileEntry === typeof undefined && typeof e.nodeId !== typeof undefined) {
191191
Sidebar.onNodeClick(e.nodeId).then(function (idx, fileEntry) {
192192
e.idx = idx;
@@ -219,63 +219,63 @@ $(document).ready(function () {
219219

220220
// Perform search on current active editor
221221
$(document).on('click', '.action-search', function () {
222-
var aceEditor = Editors.getCurrentEditor();
222+
let aceEditor = Editors.getCurrentEditor();
223223
if (typeof aceEditor !== typeof undefined) {
224224
aceEditor.execCommand('find');
225225
}
226226
});
227227

228228
// Perform undo on current active editor
229229
$(document).on('click', '.action-undo', function () {
230-
var aceEditor = Editors.getCurrentEditor();
230+
let aceEditor = Editors.getCurrentEditor();
231231
if (typeof aceEditor !== typeof undefined) {
232232
aceEditor.undo();
233233
}
234234
});
235235

236236
// Perform redo on current active editor
237237
$(document).on('click', '.action-redo', function () {
238-
var aceEditor = Editors.getCurrentEditor();
238+
let aceEditor = Editors.getCurrentEditor();
239239
if (typeof aceEditor !== typeof undefined) {
240240
aceEditor.redo();
241241
}
242242
});
243243

244244
// Perform cut on current active editor
245245
$(document).on('click', '.action-cut', function () {
246-
var aceEditor = Editors.getCurrentEditor();
246+
let aceEditor = Editors.getCurrentEditor();
247247
if (typeof aceEditor !== typeof undefined) {
248248
aceEditor.execCommand('cut');
249249
}
250250
});
251251

252252
// Perform copy on current active editor
253253
$(document).on('click', '.action-copy', function () {
254-
var aceEditor = Editors.getCurrentEditor();
254+
let aceEditor = Editors.getCurrentEditor();
255255
if (typeof aceEditor !== typeof undefined) {
256256
aceEditor.execCommand('copy');
257257
}
258258
});
259259

260260
// Perform paste to current active editor
261261
$(document).on('click', '.action-paste', function () {
262-
var aceEditor = Editors.getCurrentEditor();
262+
let aceEditor = Editors.getCurrentEditor();
263263
if (typeof aceEditor !== typeof undefined && Editors.aceClipboard.length > 0) {
264264
aceEditor.execCommand('paste', Editors.aceClipboard);
265265
}
266266
});
267267

268268
// Perform select all
269269
$(document).on('click', '.action-select-all', function () {
270-
var aceEditor = Editors.getCurrentEditor();
270+
let aceEditor = Editors.getCurrentEditor();
271271
if (typeof aceEditor !== typeof undefined) {
272272
aceEditor.execCommand('selectall');
273273
}
274274
});
275275

276276
// Perform fold all current active editor
277277
$(document).on('click', '.action-fold-all', function () {
278-
var aceEditor = Editors.getCurrentEditor();
278+
let aceEditor = Editors.getCurrentEditor();
279279
if (typeof aceEditor !== typeof undefined) {
280280
aceEditor.focus();
281281
aceEditor.getSession().foldAll();
@@ -284,7 +284,7 @@ $(document).ready(function () {
284284

285285
// Perform unfold all current active editor
286286
$(document).on('click', '.action-unfold-all', function () {
287-
var aceEditor = Editors.getCurrentEditor();
287+
let aceEditor = Editors.getCurrentEditor();
288288
if (typeof aceEditor !== typeof undefined) {
289289
aceEditor.focus();
290290
aceEditor.getSession().unfold();
@@ -298,39 +298,39 @@ $(document).ready(function () {
298298

299299
// Perform minimize
300300
$(document).on('click', '.action-minimize', function () {
301-
var aceEditor = Editors.getCurrentEditor();
301+
let aceEditor = Editors.getCurrentEditor();
302302
if (typeof aceEditor !== typeof undefined) {
303303
aceEditor.execCommand('__minimize');
304304
}
305305
});
306306

307307
// Perform maximize
308308
$(document).on('click', '.action-maximize', function () {
309-
var aceEditor = Editors.getCurrentEditor();
309+
let aceEditor = Editors.getCurrentEditor();
310310
if (typeof aceEditor !== typeof undefined) {
311311
aceEditor.execCommand('__maximize');
312312
}
313313
});
314314

315315
// Perform fullscreen
316316
$(document).on('click', '.action-fullscreen', function () {
317-
var aceEditor = Editors.getCurrentEditor();
317+
let aceEditor = Editors.getCurrentEditor();
318318
if (typeof aceEditor !== typeof undefined) {
319319
aceEditor.execCommand('__fullscreen');
320320
}
321321
});
322322

323323
// Perform font increase
324324
$(document).on('click', '.action-font-increase', function () {
325-
var aceEditor = Editors.getCurrentEditor();
325+
let aceEditor = Editors.getCurrentEditor();
326326
if (typeof aceEditor !== typeof undefined) {
327327
aceEditor.execCommand('__fontIncrease');
328328
}
329329
});
330330

331331
// Perform font decrease
332332
$(document).on('click', '.action-font-decrease', function () {
333-
var aceEditor = Editors.getCurrentEditor();
333+
let aceEditor = Editors.getCurrentEditor();
334334
if (typeof aceEditor !== typeof undefined) {
335335
aceEditor.execCommand('__fontDecrease');
336336
}
@@ -345,15 +345,15 @@ $(document).ready(function () {
345345

346346
// Toggle read only mode on current active tab
347347
$(document).on('click', '.action-toggle-readonly', function () {
348-
var aceEditor = Editors.getCurrentEditor();
348+
let aceEditor = Editors.getCurrentEditor();
349349
if (typeof aceEditor !== typeof undefined) {
350350
Editors.onToggleReadOnly(Editors.currentIdx);
351351
}
352352
});
353353

354354
// Toggle read only mode on all tabs
355355
$(document).on('click', '.action-toggle-readonly-all', function () {
356-
var aceEditor = Editors.getCurrentEditor();
356+
let aceEditor = Editors.getCurrentEditor();
357357
if (typeof aceEditor !== typeof undefined) {
358358
Editors.onToggleReadOnly();
359359
}
@@ -366,7 +366,7 @@ $(document).ready(function () {
366366
/// Sidebar
367367
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
368368

369-
var $aside = $('aside');
369+
let $aside = $('aside');
370370

371371
// Enable resizable sidebar
372372
$aside.resizable({

0 commit comments

Comments
 (0)