|
@@ -192,6 +192,16 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script is:inline>
|
|
<script is:inline>
|
|
|
|
|
+ const isEmbed = new URLSearchParams(window.location.search).get("embed") === "1";
|
|
|
|
|
+
|
|
|
|
|
+ if (isEmbed) {
|
|
|
|
|
+ // Embed mode: hide settings UI and avoid syncing/overwriting user cookies.
|
|
|
|
|
+ const settingsButton = document.getElementById("settings-button");
|
|
|
|
|
+ const settingsDialog = document.getElementById("settings-dialog");
|
|
|
|
|
+ if (settingsButton) settingsButton.style.display = "none";
|
|
|
|
|
+ if (settingsDialog) settingsDialog.style.display = "none";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function setCookie(name, value, days = 365) {
|
|
function setCookie(name, value, days = 365) {
|
|
|
const date = new Date();
|
|
const date = new Date();
|
|
|
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
@@ -251,9 +261,12 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- syncUserState();
|
|
|
|
|
|
|
+ if (!isEmbed) {
|
|
|
|
|
+ syncUserState();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
async function handleToken(jwt) {
|
|
async function handleToken(jwt) {
|
|
|
|
|
+ if (isEmbed) return;
|
|
|
try {
|
|
try {
|
|
|
const parts = jwt.credential.split(".");
|
|
const parts = jwt.credential.split(".");
|
|
|
const payload = JSON.parse(atob(parts[1]));
|
|
const payload = JSON.parse(atob(parts[1]));
|
|
@@ -276,6 +289,10 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ const isEmbed = new URLSearchParams(window.location.search).get("embed") === "1";
|
|
|
|
|
+ if (isEmbed) {
|
|
|
|
|
+ // Embed mode: no settings interactions.
|
|
|
|
|
+ } else {
|
|
|
const settingsButton = document.getElementById("settings-button");
|
|
const settingsButton = document.getElementById("settings-button");
|
|
|
const settingsDialog = document.getElementById("settings-dialog");
|
|
const settingsDialog = document.getElementById("settings-dialog");
|
|
|
const closeSettings = document.getElementById("close-settings");
|
|
const closeSettings = document.getElementById("close-settings");
|
|
@@ -910,6 +927,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style is:global>
|
|
<style is:global>
|