UPlanet Upgraded Version

This commit is contained in:
fred 2023-12-01 02:31:07 +01:00
parent 076a248cb1
commit 5b0c00be35
5 changed files with 39 additions and 5 deletions

View File

@ -129,6 +129,18 @@
border: none; border: none;
cursor: pointer; cursor: pointer;
} }
#console {
visibility: hidden;
background: rgba(0, 0, 0, 0.9); /* Adjust the background color and opacity as needed */
color: white;
width: 570px;
height: 480px;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
box-sizing: border-box;
}
</style> </style>
@ -156,7 +168,7 @@
<option value="simple">Simple earth</option> <option value="simple">Simple earth</option>
<option value="simple_tilted">Simple tilted earth</option> <option value="simple_tilted">Simple tilted earth</option>
--> -->
<option value="simple_mars">Mars</option> <option value="simple_mars">UPlanet</option>
<!-- <!--
<option value="flights">Earth with locations and flights</option> <option value="flights">Earth with locations and flights</option>
--> -->
@ -178,8 +190,13 @@
<textarea id="example_code" onclick="this.focus();this.select();"></textarea> <textarea id="example_code" onclick="this.focus();this.select();"></textarea>
</div> </div>
--> -->
<script> <button style="position: fixed; top: 10px; left: 10px;" onclick="document.getElementById('console').style.visibility = (document.getElementById('console').style.visibility === 'hidden' ? 'visible' : 'hidden');">(?)</button>
<div id="console"> ___ <a href="https://zen.g1sms.fr" target="aframe">Discover ẐenCard</a> ___ <button onclick="document.getElementById('console').style.visibility = 'hidden';"> X </button>
<iframe name="aframe" id="aframe" src="https://pad.p2p.legal/p/UPlanet_HELP" width="100%" height="100%"></iframe>
</div>
<script>
// Function to extract URL parameters // Function to extract URL parameters
function getUrlParameter(name) { function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');

View File

@ -215,7 +215,7 @@ if (deg <= 0.01) {
console.log(station) console.log(station)
button.addEventListener('click', () => { button.addEventListener('click', () => {
const url = `${station}/?uplanet=@&salt=${southWestLat}&pepper=${southWestLon}`; const url = `${station}/?uplanet=@&zlat=${southWestLat}&zlon=${southWestLon}`;
window.location.href = url; window.location.href = url;
}); });

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 312 KiB

View File

@ -183,9 +183,26 @@ if (deg <= 0.01) {
button.style.fontSize = '24px'; // Customize the font size button.style.fontSize = '24px'; // Customize the font size
button.style.color = '#fff'; // Customize the font color button.style.color = '#fff'; // Customize the font color
// Extract the hostname (e.g., "https://ipfs.domain.tld" or "http://ipfs.localhost:8080")
var currentURL = new URL(window.location.href);
var hostname = currentURL.hostname;
var port = currentURL.port;
var protocol = currentURL.protocol.split(":")[0];
// Check and replace the port if it's 8080
if (port === "8080") {
port = "1234";
}
var zHost = hostname.replace("ipfs", "astroport");
// Create the "station" variable with the specified format
var station = protocol + "://" + zHost + (port ? (":" + port) : "");
console.log(station)
button.addEventListener('click', () => { button.addEventListener('click', () => {
// const url = `http://astroport.localhost:1234/?uplanet=@&salt=${southWestLat}&pepper=${southWestLon}`; const url = `${station}/?uplanet=@&zlat=${southWestLat}&zlon=${southWestLon}`;
const url = `https://astroport.copylaradio.com/?uplanet=@&salt=${southWestLat}&pepper=${southWestLon}`;
window.location.href = url; window.location.href = url;
}); });