reorganized repl

This commit is contained in:
Jade (Rose) Rowland 2024-08-12 20:32:58 -04:00
parent 2899ee5aef
commit 5e6131af24
7 changed files with 294 additions and 283 deletions

View file

@ -132,22 +132,20 @@ export async function shareCode(codeToShare) {
}
}
export const ReplContext = createContext(null);
export const isIframe = () => window.location !== window.parent.location;
function isCrossOriginFrame() {
try {
return (!window.top.location.hostname);
return !window.top.location.hostname;
} catch (e) {
return true;
}
}
export const isUdels = () => {
if (isCrossOriginFrame()) {
return false;
}
return window.parent?.location?.pathname.includes('udels');
return window.top?.location?.pathname.includes('udels');
};
export const getAudioDevices = async () => {