same protocol as hf spaces for iframe postMessage
Browse files
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte
CHANGED
@@ -35,7 +35,9 @@
|
|
35 |
url.searchParams.set("modelId", model.id);
|
36 |
|
37 |
const parentOrigin = "https://huggingface.co";
|
38 |
-
|
|
|
|
|
39 |
|
40 |
goto(url.toString(), { replaceState: true });
|
41 |
}
|
|
|
35 |
url.searchParams.set("modelId", model.id);
|
36 |
|
37 |
const parentOrigin = "https://huggingface.co";
|
38 |
+
const searchParamsWithoutTheme = new URLSearchParams(url.searchParams.toString());
|
39 |
+
searchParamsWithoutTheme.delete("__theme");
|
40 |
+
window.parent.postMessage({ queryString: searchParamsWithoutTheme.toString() }, parentOrigin);
|
41 |
|
42 |
goto(url.toString(), { replaceState: true });
|
43 |
}
|