first PLAYER fix

This commit is contained in:
fred 2024-02-26 04:25:03 +01:00
parent 6bbf606c02
commit daaaf455d7
2 changed files with 16 additions and 9 deletions

View File

@ -610,6 +610,12 @@ $MY_PATH/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/${MOATS}/AstroID.html "Astr
rm -Rf ~/.zen/tmp/${MOATS}
) &
## CHECK .current
[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \
&& rm ~/.zen/game/players/.current 2>/dev/null \
&& ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current
echo $PSEUDO > ~/.zen/tmp/PSEUDO ## Return data to command.sh # KEEP IT
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
################################################ LAST LINE REPORT VALUES TO CALLING SCRIPT | tail -n 1

View File

@ -110,14 +110,15 @@
</script>
<script>
/////////////////////////////////////////////////////////
// Initialize Leaflet map
const map = L.map('map').setView([43.61000, 1.43000], 11);
/////////////////////////////////////////////////////////
// Add OpenStreetMap layer
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
/////////////////////////////////////////////////////////
// Fetch wallets data
axios.get('./wallets.json')
.then(response => {
@ -142,11 +143,11 @@ axios.get('./wallets.json')
// Check if socials is defined
if (socials && socials.length > 0) {
popupContent += `<a href="${socials[0].url}" target="_blank">Visit Website</a>`;
popupContent += `<a href="${socials[0].url}" target="_blank">WWW</a><br>`;
}
popupContent += `<br>* <a href="/ipfs/QmXex8PTnQehx4dELrDYuZ2t5ag85crYCBxm3fcTjVWo2k/#/app/wot/tx/${pubkey}/" target="_blank">Cesium</a>`;
popupContent += `<br>* <a href="/ipfs/QmadaNua8Cj8fwRNeEfzkMAjQ8XJuBJpD41w5pb2DBC8uc/#/app/user/${pubkey}/" target="_blank">GChange</a>`;
popupContent += `<br>* <a href="/ipfs/QmadaNua8Cj8fwRNeEfzkMAjQ8XJuBJpD41w5pb2DBC8uc/#/app/user/${pubkey}/" target="_blank">Gchange</a>`;
popupContent += `<br>* <a href="/ipns/${convertPublicKey(pubkey)}" target="_blank">+ TW +</a>`;
// Bind popup to the marker
@ -156,7 +157,7 @@ axios.get('./wallets.json')
.catch(error => {
console.error('Error fetching wallets JSON data:', error);
});
/////////////////////////////////////////////////////////
// Fetch p4n data
axios.get('./p4n.json')
.then(response => {
@ -186,7 +187,7 @@ axios.get('./p4n.json')
console.error('Error fetching p4n JSON data:', error);
});
/////////////////////////////////////////////////////////
function goToLocation(lat, lng) {
// Switch to ArcGIS World Imagery basemap
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
@ -196,7 +197,7 @@ axios.get('./p4n.json')
// Set the map view to the specified GPS position
map.setView([lat, lng], 18); // Adjust the zoom level as needed
}
/////////////////////////////////////////////////////////
// Fetch JSON data for rolling text
axios.get('gchange50.json')
.then(response => {
@ -208,13 +209,13 @@ axios.get('./p4n.json')
.catch(error => {
console.error('Error fetching rolling text JSON data:', error);
});
/////////////////////////////////////////////////////////
function displayRollingText(titles, ids) {
const rollingTextContainer = document.getElementById('rollingText');
let currentIndex = 0;
function updateText() {
rollingTextContainer.innerHTML = `<a href="https://data.gchange.fr/market/record/${ids[currentIndex]}/_share">${titles[currentIndex]}</a>`;
rollingTextContainer.innerHTML = `<a href="https://data.gchange.fr/market/record/${ids[currentIndex]}/_share" target="_blank">${titles[currentIndex]}</a>`;
currentIndex = (currentIndex + 1) % titles.length;
}