Skip to content

Commit 0bf1396

Browse files
authored
Merge pull request #620 from brownplt/mainmast
Mainmast
2 parents eb73ff3 + 666c641 commit 0bf1396

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

src/web/editor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ <h2 id="menutitle" class="screenreader-only">Navigation Controls</h2>
156156
aria-label="Contribute detailed usage information"/>
157157
<label for="detailed-logging" id="detailed-logging-label">
158158
Contribute detailed usage information.</label>
159-
<a href="https://www.pyret.org/cpo-faq#(part._logging)" target="_blank" rel="noopener noreferrer" class="focusable info-btn" role="menuitem" tabindex="-1"
159+
<a href="https://code.pyret.org/faq/" target="_blank" rel="noopener noreferrer" class="focusable info-btn" role="menuitem" tabindex="-1"
160160
id="detailed-logging-learn-more"
161161
title="Learn More" aria-label="Learn More">?</a>
162162
</span>

src/web/faq.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,7 @@ <h3>What permissions does code.pyret.org ask for and why?</h3>
4242
<li><em>Know who you are on Google</em> and <em>View your email address</em>:
4343
The site needs to know your Google identity because this allows us to give
4444
persistent access to saving to Drive that doesn't expire or require popping up
45-
new windows while you're editing. </li>
46-
47-
<li><em>Manage your photos and videos</em> and <em>View the photos, videos, and
48-
albums in your Google Drive</em>: This is used to import images into programs
49-
from your Drive (which can be useful for customizing games, for example).
50-
</li>
51-
52-
<li><em>View and manage your spreadsheets on Google Drive</em>: This enables
53-
importing tables and working with data sources in your Drive.</li>
45+
new windows while you're editing.</li>
5446

5547
<li><em>Add itself to Google Drive</em>: This lets you right-click on Pyret
5648
programs in Google Drive and "Open with Pyret."</li>

src/web/js/cpo-main.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@
150150
// NOTE(joe): this function just allocates a closure, so it's stack-safe
151151
var onCompile = gmf(cpo, "make-on-compile").app(runtime.makeFunction(saveGDriveCachedFile, "save-gdrive-cached-file"));
152152

153+
function maybeAppendSlash(s) {
154+
if(s.endsWith("/")) { return s; }
155+
return s + "/";
156+
}
157+
158+
function urlResolve(path, base) {
159+
return new URL(path, base).href;
160+
}
161+
153162
// NOTE(joe/ben): this function _used_ to be trivially stack safe, but files
154163
// need to resolve their absolute path to calculate their URI, which
155164
// requires an RPC, so this function is no-longer trivially flat
@@ -198,7 +207,7 @@
198207
return arr[0];
199208
}
200209
else if (protocol === "url-file") {
201-
return arr[0] + "/" + arr[1];
210+
return urlResolve(arr[1], maybeAppendSlash(arr[0]));
202211
}
203212
else {
204213
console.error("Unknown import: ", dependency);
@@ -256,7 +265,7 @@
256265
return runtime.getField(runtime.getField(urlLoc, "values"), "url-locator").app(arr[0], replGlobals);
257266
}
258267
else if (protocol === "url-file") {
259-
const fullUrl = arr[0] + "/" + arr[1];
268+
const fullUrl = urlResolve(arr[1], maybeAppendSlash(arr[0]));
260269
switch(urlFileMode) {
261270
case "all-remote":
262271
fetch(fullUrl).then(async (response) => {

src/web/js/dashboard/StudentDashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class StudentDashboard extends Component {
228228
</div>
229229
<div className='footer middle'>
230230
<p className='right'>
231-
<a target="_blank" href="https://www.pyret.org">pyret.org</a> | <a target="_blank" href="https://pyret.org/cpo-faq/">Privacy</a> | <a target="_blank" href="https://www.github.com/brownplt/code.pyret.org">Software</a></p>
231+
<a target="_blank" href="https://www.pyret.org">pyret.org</a> | <a target="_blank" href="https://code.pyret.org/faq/">Policies</a> | <a target="_blank" href="https://www.github.com/brownplt/code.pyret.org">Software</a></p>
232232
</div>
233233

234234
</div>

0 commit comments

Comments
 (0)