Mike0021 commited on
Commit
b456131
·
verified ·
1 Parent(s): f074dc6

Wait for embedded app readiness in browser audit

Browse files
Files changed (1) hide show
  1. scripts/live_browser_audit.mjs +8 -1
scripts/live_browser_audit.mjs CHANGED
@@ -1651,8 +1651,15 @@ async function auditHubParentEmbed({
1651
  `() => {
1652
  const toggle = document.querySelector("#share-toggle");
1653
  const upload = document.querySelector("#panel-upload");
 
1654
  return toggle && upload && !upload.hidden
1655
- ? {shareChecked: toggle.checked, title: document.title, path: location.pathname}
 
 
 
 
 
 
1656
  : false;
1657
  }`,
1658
  'the img2threejs app inside the Hugging Face iframe',
 
1651
  `() => {
1652
  const toggle = document.querySelector("#share-toggle");
1653
  const upload = document.querySelector("#panel-upload");
1654
+ const badge = document.querySelector("#llm-badge");
1655
  return toggle && upload && !upload.hidden
1656
+ && badge?.textContent?.trim() === "Model ready"
1657
+ ? {
1658
+ shareChecked: toggle.checked,
1659
+ title: document.title,
1660
+ path: location.pathname,
1661
+ badge: badge.textContent.trim()
1662
+ }
1663
  : false;
1664
  }`,
1665
  'the img2threejs app inside the Hugging Face iframe',