Remove in-game CrazyGames banner ad (#4567)

## Summary

- Remove the bottom-left 300×250 CrazyGames banner ad shown during
gameplay (created when the spawn phase ends in `InGamePromo`), including
its cleanup path in `hideAd()`
- Remove the now-unused `createBottomLeftAd()` / `clearBottomLeftAd()`
wrappers and the `banner` portion of the CrazyGames SDK type declaration

On CrazyGames, `window.adsEnabled` is already forced to `false`
(Main.ts), so the Playwire in-game path can't activate there — with this
change the game screen shows no ads at all on the CrazyGames platform.
Midgame video interstitials (singleplayer start, game exit) are
unchanged.

## Test plan

- [x] `npx tsc --noEmit` passes
- [x] ESLint passes on touched files
- [ ] On CrazyGames: no banner appears bottom-left after spawn phase
ends

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Evan
2026-07-10 12:28:23 -07:00
committed by GitHub
co-authored by Claude Fable 5
parent bf61f5847b
commit e48a424b32
2 changed files with 0 additions and 109 deletions
-35
View File
@@ -1,7 +1,6 @@
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { Controller } from "../../Controller";
import { crazyGamesSDK } from "../../CrazyGamesSDK";
import { GameView } from "../../view";
const AD_TYPES = [
@@ -52,17 +51,9 @@ export class InGamePromo extends LitElement implements Controller {
}
private showAd(): void {
console.log(
`[InGamePromo] showAd called, isOnCrazyGames=${crazyGamesSDK.isOnCrazyGames()}`,
);
if (window.innerWidth < 1100) return;
if (window.innerHeight < 750) return;
if (crazyGamesSDK.isOnCrazyGames()) {
this.showCrazyGamesAd();
return;
}
if (!window.adsEnabled) return;
this.shouldShow = true;
@@ -74,25 +65,6 @@ export class InGamePromo extends LitElement implements Controller {
});
}
private showCrazyGamesAd(): void {
console.log(
`[InGamePromo] showCrazyGamesAd called, isReady=${crazyGamesSDK.isReady()}, width=${window.innerWidth}, height=${window.innerHeight}`,
);
if (!crazyGamesSDK.isReady()) {
console.log(
"[InGamePromo] CrazyGames SDK not ready, skipping in-game ad",
);
return;
}
this.requestUpdate();
this.updateComplete.then(() => {
console.log("[InGamePromo] DOM updated, calling createBottomLeftAd");
crazyGamesSDK.createBottomLeftAd();
});
}
private checkForAds(): void {
if (this.adCheckInterval) {
clearInterval(this.adCheckInterval);
@@ -146,13 +118,6 @@ export class InGamePromo extends LitElement implements Controller {
this.adsVisible = false;
this.destroyBottomRail();
if (crazyGamesSDK.isOnCrazyGames()) {
crazyGamesSDK.clearBottomLeftAd();
this.shouldShow = false;
this.requestUpdate();
return;
}
if (!window.ramp) {
console.warn("Playwire RAMP not available for in-game ad");
return;