From 016353d871157c61a5855430e68de4812a91918b Mon Sep 17 00:00:00 2001 From: der468 Date: Wed, 11 Jun 2025 05:35:17 -0700 Subject: [PATCH 1/4] Create manifest.json --- submissions/Good Environment/manifest.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 submissions/Good Environment/manifest.json diff --git a/submissions/Good Environment/manifest.json b/submissions/Good Environment/manifest.json new file mode 100644 index 00000000..7332c44a --- /dev/null +++ b/submissions/Good Environment/manifest.json @@ -0,0 +1,19 @@ +{ + "manifest_version": 3, + "name": "Good Environment Game", + "version": "1.0", + "description": "A simple environment-friendly decision game.", + "action": { + "default_popup": "popup.html", + "default_icon": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } + }, + "icons": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } +} From f504927db4558ab6b07d4302dfd1a9bc565d1068 Mon Sep 17 00:00:00 2001 From: der468 Date: Wed, 11 Jun 2025 05:36:13 -0700 Subject: [PATCH 2/4] Create popup.html --- submissions/Good Environment/popup.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 submissions/Good Environment/popup.html diff --git a/submissions/Good Environment/popup.html b/submissions/Good Environment/popup.html new file mode 100644 index 00000000..c8afda80 --- /dev/null +++ b/submissions/Good Environment/popup.html @@ -0,0 +1,16 @@ + + + + Good Environment Game + + + +

🌱 Environment Game

+

Environment Health: 100

+ + + + + + + From 68f5e1d04ca95bf06018d2575b15ccb16cfb6e12 Mon Sep 17 00:00:00 2001 From: der468 Date: Wed, 11 Jun 2025 05:36:49 -0700 Subject: [PATCH 3/4] Create styles.css --- submissions/Good Environment/styles.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 submissions/Good Environment/styles.css diff --git a/submissions/Good Environment/styles.css b/submissions/Good Environment/styles.css new file mode 100644 index 00000000..6a8607aa --- /dev/null +++ b/submissions/Good Environment/styles.css @@ -0,0 +1,21 @@ +body { + width: 250px; + font-family: Arial, sans-serif; + text-align: center; + padding: 10px; +} + +button { + margin: 5px; + padding: 10px; + font-size: 14px; + cursor: pointer; +} + +h1 { + font-size: 18px; +} + +p { + font-weight: bold; +} From 5d2be94475020bde74d6a3200f2336145e45af20 Mon Sep 17 00:00:00 2001 From: der468 Date: Wed, 11 Jun 2025 05:37:32 -0700 Subject: [PATCH 4/4] Create popup.js --- submissions/Good Environment/popup.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 submissions/Good Environment/popup.js diff --git a/submissions/Good Environment/popup.js b/submissions/Good Environment/popup.js new file mode 100644 index 00000000..1ac8d5d3 --- /dev/null +++ b/submissions/Good Environment/popup.js @@ -0,0 +1,22 @@ +let score = 100; + +function updateScore() { + document.getElementById('score').innerText = `Environment Health: ${score}`; +} + +function makeGoodChoice() { + score += 10; + updateScore(); +} + +function makeBadChoice() { + score -= 15; + updateScore(); +} + +function resetGame() { + score = 100; + updateScore(); +} + +document.addEventListener('DOMContentLoaded', updateScore);