mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
maybe fix auth in iframes (#1261)
* maybe fix auth in iframes * remove comment * Update gradio/templates/frontend/index.html * fix gitignore? Co-authored-by: aliabid94 <aabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
569a16998d
commit
b69e8cb151
@ -11,7 +11,6 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<head>
|
<head>
|
||||||
<base target="_blank" />
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
|
@ -178,6 +178,14 @@
|
|||||||
|
|
||||||
async function handle_mount() {
|
async function handle_mount() {
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
|
var a = document.getElementsByTagName("a");
|
||||||
|
|
||||||
|
for (var i = 0; i < a.length; i++) {
|
||||||
|
const target = a[i].getAttribute("target");
|
||||||
|
if (target !== "_blank") a[i].setAttribute("target", "_blank");
|
||||||
|
}
|
||||||
|
|
||||||
dependencies.forEach(
|
dependencies.forEach(
|
||||||
(
|
(
|
||||||
{ targets, trigger, inputs, outputs, queue, backend_fn, frontend_fn },
|
{ targets, trigger, inputs, outputs, queue, backend_fn, frontend_fn },
|
||||||
|
@ -86,6 +86,7 @@ window.launchGradio = (config: Config, element_query: string) => {
|
|||||||
target: target,
|
target: target,
|
||||||
props: config
|
props: config
|
||||||
});
|
});
|
||||||
|
window.__gradio_loader__.$set({ status: "complete" });
|
||||||
} else {
|
} else {
|
||||||
handle_darkmode(target);
|
handle_darkmode(target);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user