mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-22 19:18:31 +00:00
testing:
This commit is contained in:
parent
bfead58212
commit
2899ee5aef
@ -134,9 +134,17 @@ export async function shareCode(codeToShare) {
|
|||||||
|
|
||||||
export const ReplContext = createContext(null);
|
export const ReplContext = createContext(null);
|
||||||
|
|
||||||
|
function isCrossOriginFrame() {
|
||||||
|
try {
|
||||||
|
return (!window.top.location.hostname);
|
||||||
|
} catch (e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const isUdels = () => {
|
export const isUdels = () => {
|
||||||
const isIframe = window.location !== window.parent.location;
|
if (isCrossOriginFrame()) {
|
||||||
if (isIframe) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return window.parent?.location?.pathname.includes('udels');
|
return window.parent?.location?.pathname.includes('udels');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user