We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2986c5d commit 57d6fc8Copy full SHA for 57d6fc8
assets/js/globals.js
@@ -1,10 +1,9 @@
1
const params = new URLSearchParams(window.location.search)
2
+const isFrame = window.self !== window.parent
3
-export const isEmbedded = window.self !== window.parent
4
-
5
-export const isPreview = params.has('preview')
6
7
-export const isHint = params.has('hint')
+export const isPreview = isFrame && params.has('preview')
+export const isHint = isFrame && params.has('hint')
+export const isEmbedded = isPreview || isHint
8
9
// These variables are set by other scripts (e.g. generated by the docs task).
10
0 commit comments