Clicker: Fix für Teilen
This commit is contained in:
@@ -704,7 +704,7 @@ function checkAchievements() {
|
||||
achievement.earned = true;
|
||||
|
||||
if (notificationsOn) {
|
||||
showNotification(`Achievement freigeschaltet: ${achievement.name}!`);
|
||||
showNotification(`Erfolg freigeschaltet: ${achievement.name}!`);
|
||||
}
|
||||
|
||||
renderAchievements();
|
||||
@@ -979,10 +979,10 @@ function generateShareTexts() {
|
||||
const url = 'https://tools.ponywave.de/clicker';
|
||||
|
||||
// Variante 1: Klicks fokussiert
|
||||
shareTexts[1] = `Ich habe beim PonyWave Clicker Game ${clicks} mal in ${timeText} geklickt! Wie viel schaffst du?\n\n#ClickerGame #PonyWave\n${url}`;
|
||||
shareTexts[1] = `Ich habe beim PonyWave Clicker Game ${clicks} mal in ${timeText} geklickt! Wie viel schaffst du?\n\n#ClickerGame #PonyWave`;
|
||||
|
||||
// Variante 2: Punkte fokussiert
|
||||
shareTexts[2] = `Ich habe ${points} Punkte im PonyWave Clicker Game erreicht! 🎮 Beat meinen Score!\n\n#ClickerGame #PonyWave\n${url}`;
|
||||
shareTexts[2] = `Ich habe ${points} Punkte im PonyWave Clicker Game erreicht! 🎮 Schlag meinen Score!\n\n#ClickerGame #PonyWave`;
|
||||
|
||||
// Variante 3: Vollständige Stats
|
||||
let variant3 = `PonyWave Clicker: ${clicks} Klicks | ${points} Punkte`;
|
||||
@@ -990,9 +990,9 @@ function generateShareTexts() {
|
||||
variant3 += ` | Prestige Level ${prestigeLevel}`;
|
||||
}
|
||||
if (earnedAchievements > 0) {
|
||||
variant3 += ` | ${earnedAchievements} Achievements`;
|
||||
variant3 += ` | ${earnedAchievements} Erfolge`;
|
||||
}
|
||||
variant3 += ` 🏆\n\n#ClickerGame #PonyWave\n${url}`;
|
||||
variant3 += ` 🏆\n\n#ClickerGame #PonyWave`;
|
||||
shareTexts[3] = variant3;
|
||||
}
|
||||
|
||||
@@ -1027,9 +1027,11 @@ function selectShareVariant(variantNum) {
|
||||
function copyShareText() {
|
||||
const textarea = document.getElementById('shareText');
|
||||
const text = textarea.value;
|
||||
const url = 'https://tools.ponywave.de/clicker';
|
||||
const fullText = text + '\n' + url;
|
||||
|
||||
// Copy to clipboard
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
navigator.clipboard.writeText(fullText).then(() => {
|
||||
// Show feedback
|
||||
const feedback = document.getElementById('copyFeedback');
|
||||
feedback.classList.add('show');
|
||||
@@ -1050,16 +1052,16 @@ function shareToSocial(platform) {
|
||||
|
||||
switch (platform) {
|
||||
case 'twitter':
|
||||
shareUrl = `https://x.com/intent/post?text=${encodeURIComponent(text)}`;
|
||||
shareUrl = `https://x.com/intent/post?text=${encodeURIComponent(text + '\n' + url)}`;
|
||||
break;
|
||||
case 'whatsapp':
|
||||
shareUrl = `https://wa.me/?text=${encodeURIComponent(text)}`;
|
||||
shareUrl = `https://wa.me/?text=${encodeURIComponent(text + '\n' + url)}`;
|
||||
break;
|
||||
case 'telegram':
|
||||
shareUrl = `https://t.me/share/url?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`;
|
||||
break;
|
||||
case 'facebook':
|
||||
shareUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}"e=${encodeURIComponent(text)}`;
|
||||
shareUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user