Hide skins & account login if in iframe (#2126)

## Description:

CrazyGames doesn't allow purchase (must be integrated into their sdk),
so disable it on iframe for now.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-10-01 12:05:10 -07:00
committed by GitHub
parent 30856341cd
commit bc5f18dee8
4 changed files with 22 additions and 3 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { LitElement, TemplateResult, html } from "lit";
import { customElement, state } from "lit/decorators.js";
import { translateText } from "../../../client/Utils";
import { isInIframe, translateText } from "../../../client/Utils";
import { ColorPalette, Pattern } from "../../../core/CosmeticSchemas";
import { EventBus } from "../../../core/EventBus";
import { GameUpdateType } from "../../../core/game/GameUpdates";
@@ -95,7 +95,7 @@ export class WinModal extends LitElement implements Layer {
}
innerHtml() {
if (this.rand < 0.25) {
if (isInIframe() || this.rand < 0.25) {
return this.steamWishlist();
}
return this.renderPatternButton();