Eaglercraft-Extras/servers.html

104 lines
No EOL
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Servers</title>
<link rel="shortcut icon" href="mc-logo.png" type="image/x-icon">
<link rel="stylesheet" href="home.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round"
rel="stylesheet">
</head>
<body>
<ul>
<li><a style="margin-left: 5px;" href="index.html">Home</a></li>
<li><a href="clients.html">Clients</a></li>
<li><a href="worlds.html">Worlds</a></li>
<li><a href="packs.html">Resource Packs</a></li>
<li><a class="active" href="servers.html">Servers</a></li>
<li style="float: right;"><a href="https://github.com/cobblesteve01/Eaglercraft-Extras" target="_blank"><img src="github.png" style="height: 25px; color: white;" alt=""></a></li>
</ul>
<div class="button-container">
<a href="#" class="copyLink" data-link="wss://3b8d44b5-dbfb-4cf9-b4da-03d056d9f632-00-6rwn7z7ag2xt.picard.replit.dev">Copy IP</a>
<a href="#" class="copyLink" data-link="wss://super-chainsaw-r44rpp5j6x9w35r6p-8081.app.github.dev/">Copy IP</a>
</div>
<script>
// Function to copy text to clipboard
function copyToClipboard(text) {
const tempInput = document.createElement('input');
tempInput.value = text;
document.body.appendChild(tempInput);
tempInput.select();
tempInput.setSelectionRange(0, 99999); // For mobile devices
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('IP Copied!');
}
// Add event listeners to all links with class "copyLink"
document.querySelectorAll('.copyLink').forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault(); // Prevent the default action of the <a> element
const link = this.getAttribute('data-link');
copyToClipboard(link);
});
});
</script>
</body>
</html>
<h1 align="center" style="font-size: 54px; margin-bottom: -10px; text-decoration: none">Servers</h1>
<p align="center">Have fun! Statuses updated weekly.</p>
<br><br>
<div class="container">
<button class="button" style="height: 250px;">
<h1 style="margin-bottom: 20px; margin-top: 5px; font-size: 30px;">Play SMP</h1>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<!-- Link with copy functionality -->
<a href="" onclick="copyToClipboard()" class="copyLink" data-link="wss://3b8d44b5-dbfb-4cf9-b4da-03d056d9f632-00-6rwn7z7ag2xt.picard.replit.dev"><span class="material-icons-round" style="scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
<button class="button" style="height: 250px;">
<h1 style="margin-bottom: 20px; margin-top: 5px; font-size: 30px;">Play SMP</h1>
<a class="status">Status: <span class="online">Online</span></a>
<br><br>
<!-- Link with copy functionality -->
<a href="" onclick="copyToClipboard()" class="copyLink" data-link="wss://3b8d44b5-dbfb-4cf9-b4da-03d056d9f632-00-6rwn7z7ag2xt.picard.replit.dev"><span class="material-icons-round" style="scale: 110%;">
content_copy
</span>&nbsp;Copy IP</a>
</button>
</div>
<script>
// Function to copy text to clipboard
function copyToClipboard(text) {
const tempInput = document.createElement('input');
tempInput.value = text;
document.body.appendChild(tempInput);
tempInput.select();
tempInput.setSelectionRange(0, 99999); // For mobile devices
document.execCommand('copy');
document.body.removeChild(tempInput);
window.alert('IP copied to clipboard!');
}
// Add event listener to the link with class "copyLink"
document.querySelector('.copyLink').addEventListener('click', function(event) {
event.preventDefault(); // Prevent the default action of the <a> element
const link = this.getAttribute('data-link');
copyToClipboard(link);
});
</script>
</body>
</html>