mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-12 14: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);
|
||||
|
||||
function isCrossOriginFrame() {
|
||||
try {
|
||||
return (!window.top.location.hostname);
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const isUdels = () => {
|
||||
const isIframe = window.location !== window.parent.location;
|
||||
if (isIframe) {
|
||||
if (isCrossOriginFrame()) {
|
||||
return false;
|
||||
}
|
||||
return window.parent?.location?.pathname.includes('udels');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user