steveyehtw commited on
Commit
f095497
·
1 Parent(s): 5dd93eb

fix: add helper redirect link for Appetize.io free-tier embeds

Browse files
Files changed (1) hide show
  1. templates/player.html +12 -0
templates/player.html CHANGED
@@ -958,6 +958,18 @@
958
  }
959
  phone.appendChild(screen);
960
  viewportFrame.appendChild(phone);
 
 
 
 
 
 
 
 
 
 
 
 
961
  } else {
962
  // Web based game (HTML or External Link)
963
  // Hide side controls and console log panel, render full viewport width
 
958
  }
959
  phone.appendChild(screen);
960
  viewportFrame.appendChild(phone);
961
+
962
+ if (appetizeKey) {
963
+ const helper = document.createElement("div");
964
+ helper.style.marginTop = "1rem";
965
+ helper.style.fontSize = "0.85rem";
966
+ helper.style.color = "var(--text-muted)";
967
+ helper.style.textAlign = "center";
968
+ helper.style.maxWidth = "320px";
969
+ helper.style.lineHeight = "1.5";
970
+ helper.innerHTML = `⚠️ 因 Appetize.io 免費方案限制內嵌功能,若畫面顯示「未啟用內嵌」,請 <a href="https://appetize.io/app/${encodeURIComponent(appetizeKey)}" target="_blank" style="color: #c084fc; text-decoration: underline; font-weight: 600;">點此在新分頁中打開模擬器</a>。`;
971
+ viewportFrame.appendChild(helper);
972
+ }
973
  } else {
974
  // Web based game (HTML or External Link)
975
  // Hide side controls and console log panel, render full viewport width