Skip to content

Commit 384d6b4

Browse files
committed
Merge branch 'horizon' into mainmast
2 parents c54a3f6 + b0e18cc commit 384d6b4

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

src/scripts/npm-dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function rpcForwardCallback(module, name) {
5959
return async function(...args) {
6060
const realargs = args.slice(0, args.length - 1);
6161
const callback = args[args.length - 1];
62-
if(!window.MESSAGES.sendRpc) { throw new Error("Cannot " + name + " on the web"); }
62+
if(!(window.MESSAGES && window.MESSAGES.sendRpc)) { throw new Error("Cannot " + name + " on the web"); }
6363
else {
6464
try {
6565
const result = await window.MESSAGES.sendRpc(module, name, realargs);

src/web/arr/trove/dcic2024.arr

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ include from BASIC: *, type *, data * end
1313
include tables
1414
include chart
1515
import statistics as S
16-
# import lists as L
16+
# import lists as L
1717
import sets as ST
18+
import constants as C
1819

1920
provide:
2021
get-row,
@@ -42,7 +43,15 @@ provide:
4243
group,
4344
count,
4445
count-many,
45-
render-chart
46+
render-chart,
47+
pie-chart,
48+
bar-chart,
49+
dot-plot,
50+
labeled-dot-plot
51+
end
52+
53+
provide from C:
54+
E
4655
end
4756

4857
# ----------- TABLE FUNCTIONS -----------

src/web/blocks.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
<title>code.pyret.org</title>
6-
<link rel="preload" href="{{&PYRET}}" as="script">
6+
<link crossorigin="anonymous" rel="preload" href="{{&PYRET}}" as="script">
7+
<script>window.PYRET = "{{&PYRET}}";</script>
78
<link rel="stylesheet" href="/css/reset.css" />
89
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
910
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:400,700" />
@@ -23,6 +24,8 @@
2324
<link rel="stylesheet" href="/css/themes/high-contrast-dark.css" />
2425
<link rel="icon" type="image/png" href="/img/pyret-icon.png" />
2526
<style id="highlight-styles"></style>
27+
<script src="{{ &BASE_URL }}/js/vega.min.js"></script>
28+
<script src="{{ &BASE_URL }}/js/vega-tooltip.min.js"></script>
2629
<script>var APP_LOG_URL = "{{{ LOG_URL }}}";</script>
2730
<script src="/js/localSettings.js"></script>
2831
</head>
@@ -485,6 +488,7 @@ <h2>Announcements</h2>
485488
<script src="js/snap/src/sha512.js"></script>
486489
<script src="js/snap/src/FileSaver.min.js"></script>
487490
<script>
491+
var IMAGE_PROXY_BYPASS = "{{ &IMAGE_PROXY_BYPASS }}" === "true";
488492
var APP_BASE_URL = "{{{ BASE_URL }}}";
489493
var CSRF_TOKEN = "{{{ CSRF_TOKEN }}}";
490494
$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
@@ -494,6 +498,7 @@ <h2>Announcements</h2>
494498
jqXHR.setRequestHeader('X-CSRF-Token', CSRF_TOKEN);
495499
}
496500
});
501+
var URL_FILE_MODE = window.URL_FILE_MODE = "{{ URL_FILE_MODE }}";
497502
</script>
498503
<script>
499504
var replMain = $(".replMain");

src/web/js/beforeBlocks.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,8 @@ $(function() {
13041304
});
13051305

13061306
var pyretLoad = document.createElement('script');
1307-
console.log(process.env.PYRET);
1308-
pyretLoad.src = process.env.PYRET;
1307+
console.log(window.PYRET);
1308+
pyretLoad.src = window.PYRET;
13091309
pyretLoad.type = "text/javascript";
13101310
document.body.appendChild(pyretLoad);
13111311

@@ -1358,8 +1358,7 @@ $(function() {
13581358
}
13591359

13601360
$(pyretLoad).on("error", function(e) {
1361-
logFailureAndManualFetch(process.env.PYRET, e);
1362-
console.log(process.env);
1361+
logFailureAndManualFetch(window.PYRET, e);
13631362
pyretLoad2.src = process.env.PYRET_BACKUP;
13641363
pyretLoad2.type = "text/javascript";
13651364
document.body.appendChild(pyretLoad2);

0 commit comments

Comments
 (0)