-
-
S
-
h
-
a
-
r
-
e
+
+

Creative Crafter
+
Flappy Witch
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-

-

-
+
+
+

+

+
-
-
+
+ // Funktion zum Schließen des Popup-Fensters
+ function closeSharePopup() {
+ document.getElementById("shareModal").style.display = "none";
+ }
+
+ // Teilen via WhatsApp
+ function shareViaWhatsApp() {
+ const text = encodeURIComponent('Schau dir dieses fantastische Spiel an! https://test.creative-crafter.de/programmieren/spiele/Flappy-Witch/');
+ const url = 'https://api.whatsapp.com/send?text=' + text;
+ window.open(url, '_blank');
+ }
+
+ // Teilen via Telegram
+ function shareViaTelegram() {
+ const text = encodeURIComponent('Schau dir dieses fantastische Spiel an! https://test.creative-crafter.de/programmieren/spiele/Flappy-Witch/');
+ const url = 'https://t.me/share/url?url=' + text;
+ window.open(url, '_blank');
+ }
+
+ // Teilen via E-Mail
+ function shareViaEmail() {
+ const subject = encodeURIComponent('Flappy Witch');
+ const body = encodeURIComponent('Schau dir dieses fantastische Spiel an! https://test.creative-crafter.de/programmieren/spiele/Flappy-Witch/');
+ window.location.href = 'mailto:?subject=' + subject + '&body=' + body;
+ }
+
+ // Schließt das Popup bei Klick außerhalb des Inhalts
+ window.onclick = function(event) {
+ const modal = document.getElementById('shareModal');
+ if (event.target == modal) {
+ closeSharePopup();
+ }
+ }
+