Skip to content

Commit a7f6032

Browse files
committed
Remove some globally exposed methods.
1 parent b037a75 commit a7f6032

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

web/js/codeworld.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function attachEventListeners() {
7070

7171
$('#startRecButton').on('click', captureStart);
7272
$('#stopRecButton').on('click', stopRecording);
73-
$('#shareButton').on('click', share);
73+
$('#shareButton').on('click', () => share(compile));
7474
$('#inspectButton').on('click', inspect);
7575

7676
$('#runButton').on('click', compile);
@@ -1277,7 +1277,3 @@ function downloadProject() {
12771277
document.body.removeChild(elem);
12781278
}
12791279
}
1280-
1281-
// TEMP: required by setCode in codeworld_shared.js
1282-
window.compile = compile;
1283-
window.stopRun = stopRun;

web/js/codeworld_shared.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ function loadProject(name, path, buildMode, successFunc) {
11741174
});
11751175
}
11761176

1177-
function share() {
1177+
function share(compile) {
11781178
let offerSource = true;
11791179

11801180
function go() {

web/js/funblocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function attachEventListeners() {
6666
$('#deleteButton').on('click', deleteProject);
6767
$('#docButton').on('click', help);
6868
$('#shareFolderButton').on('click', () => shareFolder_(window.projectEnv));
69-
$('#shareButton').on('click', share);
69+
$('#shareButton').on('click', () => share(compile));
7070

7171
$('#runner').on('load', toggleObsoleteCodeAlert);
7272
}

0 commit comments

Comments
 (0)