Skip to content

Commit b0e18cc

Browse files
committed
fix blocks to match other templating updates
1 parent 2cfb019 commit b0e18cc

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

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)