We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 321f620 commit 5bf915eCopy full SHA for 5bf915e
extension/src/content/index.ts
@@ -44,7 +44,16 @@ async function _init(localConfigs: Promise<object>) {
44
setupStyles('content.styles.css')
45
// setupStyles(configs.WEB_CSS_CONFIG_URL, false)
46
47
- const origin = window.location.origin
+ let origin = window.location.origin
48
+ try {
49
+ const MetabaseBootstrap = JSON.parse(document.getElementById("_metabaseBootstrap").textContent)
50
+ const siteUrl = MetabaseBootstrap['site-url']
51
+ if (siteUrl && !isEmpty(siteUrl)) {
52
+ origin = siteUrl
53
+ }
54
+ } catch (e) {
55
+ console.warn('[minusx] MetabaseBootstrap not found, using window location origin')
56
57
const href = window.location.href
58
const width = '350'
59
const variant = 'default'
0 commit comments