Spaces:
Running
Running
Yang Gu
commited on
Commit
·
397aeb0
1
Parent(s):
a505861
Fix HF demo links again
Browse files
main.js
CHANGED
@@ -32411,9 +32411,9 @@ function setSampleIFrame(demoInfo, search = '') {
|
|
32411 |
// Replace the iframe because changing src adds to the user's history.
|
32412 |
demoContainerElem.innerHTML = '';
|
32413 |
if (filename) {
|
32414 |
-
const src = url || `demo/${filename}${search}
|
32415 |
if (window.location.origin.includes("hf")) {
|
32416 |
-
demoContainerElem.appendChild(createElem('iframe', { src: `/${src}
|
32417 |
} else {
|
32418 |
demoContainerElem.appendChild(createElem('iframe', { src }));
|
32419 |
}
|
|
|
32411 |
// Replace the iframe because changing src adds to the user's history.
|
32412 |
demoContainerElem.innerHTML = '';
|
32413 |
if (filename) {
|
32414 |
+
const src = url || `demo/${filename}${search}/index.html`;
|
32415 |
if (window.location.origin.includes("hf")) {
|
32416 |
+
demoContainerElem.appendChild(createElem('iframe', { src: `/${src}` }));
|
32417 |
} else {
|
32418 |
demoContainerElem.appendChild(createElem('iframe', { src }));
|
32419 |
}
|