Skip to content

Commit 0597622

Browse files
committed
don't show ads on winlose menu
1 parent 87d1a8d commit 0597622

2 files changed

Lines changed: 60 additions & 12 deletions

File tree

setup.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# Comprehensive setup script for Hetzner server with Docker and Cloudflare R2 configuration
3+
4+
# Exit on error
5+
set -e
6+
7+
echo "🔄 Updating system..."
8+
apt update && apt upgrade -y
9+
10+
echo "🐳 Installing Docker..."
11+
# Install Docker using official script
12+
curl -fsSL https://get.docker.com -o get-docker.sh
13+
sh get-docker.sh
14+
systemctl enable --now docker
15+
16+
# Set up Docker Hub credentials
17+
echo "🔐 Setting up Docker Hub login..."
18+
echo "Enter your Docker Hub username:"
19+
read DOCKER_USERNAME
20+
echo "Enter your Docker Hub password/token:"
21+
read -s DOCKER_PASSWORD
22+
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
23+
echo "✅ Docker Hub login configured"
24+
25+
echo "☁️ Installing AWS CLI for Cloudflare R2..."
26+
# Install AWS CLI
27+
apt install -y unzip curl
28+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
29+
unzip awscliv2.zip
30+
./aws/install
31+
rm -rf aws awscliv2.zip
32+
33+
# Configure AWS CLI for R2
34+
echo "🔧 Configuring AWS CLI for Cloudflare R2..."
35+
echo "Enter your Cloudflare R2 Access Key ID:"
36+
read R2_ACCESS_KEY
37+
echo "Enter your Cloudflare R2 Secret Access Key:"
38+
read -s R2_SECRET_KEY
39+
echo "Enter your Cloudflare Account ID:"
40+
read CLOUDFLARE_ACCOUNT_ID
41+
42+
# Create R2 profile configuration
43+
mkdir -p ~/.aws
44+
cat > ~/.aws/credentials << EOL
45+
[r2]
46+
aws_access_key_id = $R2_ACCESS_KEY
47+
aws_secret_access_key = $R2_SECRET_KEY
48+
EOL
49+
50+
cat > ~/.aws/config << EOL
51+
[profile r2]
52+
region = auto
53+
endpoint_url = https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com
54+
EOL
55+
56+
echo "✅ R2 configuration complete"
57+
58+
echo "🎉 Setup complete! You can find helpful Docker and R2 commands in ~/docker-commands.sh"
59+
echo "Test your R2 connection: aws s3 ls --profile r2"

src/client/graphics/layers/WinModal.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export class WinModal extends LitElement implements Layer {
149149
return html`
150150
<div class="win-modal ${this.isVisible ? "visible" : ""}">
151151
<h2>${this._title || ""}</h2>
152-
${this.won ? this.supportHTML() : this.adsHTML()}
152+
${this.supportHTML()}
153153
<div class="button-container">
154154
<button @click=${this._handleExit}>Exit Game</button>
155155
<button @click=${this.hide}>Keep Playing</button>
@@ -172,17 +172,6 @@ export class WinModal extends LitElement implements Layer {
172172
}
173173
}
174174

175-
adsHTML() {
176-
return html`<ins
177-
class="adsbygoogle"
178-
style="display:block"
179-
data-ad-client="ca-pub-7035513310742290"
180-
data-ad-slot="winmodalad"
181-
data-ad-format="auto"
182-
data-full-width-responsive="true"
183-
></ins>`;
184-
}
185-
186175
supportHTML() {
187176
return html`
188177
<div style="text-align: center; margin: 15px 0;">

0 commit comments

Comments
 (0)