-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathamigo.html
More file actions
60 lines (54 loc) · 1.95 KB
/
amigo.html
File metadata and controls
60 lines (54 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="windows-1252">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Amigo Secreto</title>
<link rel="stylesheet" href="https://asagod.github.io/dndsheet/styles/app.css">
<link rel="stylesheet" href="https://bootswatch.com/5/darkly/bootstrap.css">
<style>
body {
padding-top: 50px;
}
.container {
max-width: 600px;
margin-top: 30px;
}
</style>
</head>
<body>
<div class="container">
<div class="card shadow-lg">
<div class="card-header bg-primary text-white">
<h3 class="card-title">Amigo Secreto</h3>
</div>
<div class="card-body">
<p class="lead">Seu amigo secreto é:</p>
<div id="output" class="alert alert-info" role="alert">
<!-- Decoded content will appear here -->
</div>
</div>
</div>
</div>
<script>
// Get the base64 string from the URL query parameter
const urlParams = new URLSearchParams(window.location.search);
const base64String = urlParams.get('data');
if (base64String) {
try {
// Decode the base64 string and display the result
const decodedString = atob(base64String); // Decode the base64 string
document.getElementById('output').innerText = decodedString;
} catch (error) {
document.getElementById('output').innerText = 'Error decoding the base64 string.';
document.getElementById('output').classList.remove('alert-info');
document.getElementById('output').classList.add('alert-danger');
}
} else {
document.getElementById('output').innerText = 'No base64 data found in the URL.';
document.getElementById('output').classList.remove('alert-info');
document.getElementById('output').classList.add('alert-warning');
}
</script>
</body>
</html>