Emi Matchu
0e314482f7
I haven't been running Prettier consistently on things in this project. Now, it's quick-runnable, and I've got it on everything! Also, I just think tabs are the right default for this kind of thing, and I'm glad to get to switch over to it! (In `package.json`.)
20 lines
531 B
JavaScript
20 lines
531 B
JavaScript
const ORIGIN = readOrigin();
|
|
const SUPPORT_SECRET = readSupportSecret();
|
|
|
|
export function buildImpress2020Url(path) {
|
|
return new URL(path, ORIGIN).toString();
|
|
}
|
|
|
|
export function getSupportSecret() {
|
|
return SUPPORT_SECRET;
|
|
}
|
|
|
|
function readOrigin() {
|
|
const node = document.querySelector("meta[name=impress-2020-origin]");
|
|
return node?.content || "https://impress-2020.openneo.net";
|
|
}
|
|
|
|
function readSupportSecret() {
|
|
const node = document.querySelector("meta[name=impress-2020-support-secret]");
|
|
return node?.content || null;
|
|
}
|