reorganized repl
This commit is contained in:
parent
2899ee5aef
commit
5e6131af24
7 changed files with 294 additions and 283 deletions
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue