Leaderboard
This commit is contained in:
@@ -291,7 +291,7 @@ async function findNearestLocation() {
|
|||||||
let errorMessage = currentLanguage === 'de' ? 'Standort konnte nicht ermittelt werden.' : 'Location could not be determined.';
|
let errorMessage = currentLanguage === 'de' ? 'Standort konnte nicht ermittelt werden.' : 'Location could not be determined.';
|
||||||
|
|
||||||
if (error.code) {
|
if (error.code) {
|
||||||
switch(error.code) {
|
switch (error.code) {
|
||||||
case error.PERMISSION_DENIED:
|
case error.PERMISSION_DENIED:
|
||||||
errorMessage = currentLanguage === 'de' ?
|
errorMessage = currentLanguage === 'de' ?
|
||||||
'Standortzugriff wurde verweigert. Bitte erlaube den Standortzugriff in den Browser-Einstellungen.' :
|
'Standortzugriff wurde verweigert. Bitte erlaube den Standortzugriff in den Browser-Einstellungen.' :
|
||||||
@@ -583,7 +583,7 @@ function updateLeaderboard(data) {
|
|||||||
// Event Listeners Setup
|
// Event Listeners Setup
|
||||||
function setupEventListeners() {
|
function setupEventListeners() {
|
||||||
// Location select event listener
|
// Location select event listener
|
||||||
document.getElementById('locationSelect').addEventListener('change', function() {
|
document.getElementById('locationSelect').addEventListener('change', function () {
|
||||||
// Save location selection to cookie
|
// Save location selection to cookie
|
||||||
const selectedOption = this.options[this.selectedIndex];
|
const selectedOption = this.options[this.selectedIndex];
|
||||||
if (selectedOption.value) {
|
if (selectedOption.value) {
|
||||||
@@ -595,7 +595,7 @@ function setupEventListeners() {
|
|||||||
|
|
||||||
// Time tab event listeners
|
// Time tab event listeners
|
||||||
document.querySelectorAll('.time-tab').forEach(tab => {
|
document.querySelectorAll('.time-tab').forEach(tab => {
|
||||||
tab.addEventListener('click', function() {
|
tab.addEventListener('click', function () {
|
||||||
// Remove active class from all tabs
|
// Remove active class from all tabs
|
||||||
document.querySelectorAll('.time-tab').forEach(t => t.classList.remove('active'));
|
document.querySelectorAll('.time-tab').forEach(t => t.classList.remove('active'));
|
||||||
// Add active class to clicked tab
|
// Add active class to clicked tab
|
||||||
@@ -715,7 +715,7 @@ function loadLanguagePreference() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start the application when DOM is loaded
|
// Start the application when DOM is loaded
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
loadLanguagePreference();
|
loadLanguagePreference();
|
||||||
changeLanguage(); // Apply saved language
|
changeLanguage(); // Apply saved language
|
||||||
init();
|
init();
|
||||||
@@ -724,7 +724,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
// Add cookie settings button functionality
|
// Add cookie settings button functionality
|
||||||
const cookieSettingsBtn = document.getElementById('cookie-settings-footer');
|
const cookieSettingsBtn = document.getElementById('cookie-settings-footer');
|
||||||
if (cookieSettingsBtn) {
|
if (cookieSettingsBtn) {
|
||||||
cookieSettingsBtn.addEventListener('click', function() {
|
cookieSettingsBtn.addEventListener('click', function () {
|
||||||
if (window.cookieConsent) {
|
if (window.cookieConsent) {
|
||||||
window.cookieConsent.resetConsent();
|
window.cookieConsent.resetConsent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user