-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimages.html
More file actions
148 lines (126 loc) · 5.72 KB
/
Copy pathimages.html
File metadata and controls
148 lines (126 loc) · 5.72 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!doctype html>
<html>
<head>
<title>Stat Images</title> <!-- Title desplayed in browser tab -->
<link rel="icon" type="image/svg" href="/assets/images/svg/icon-blue.svg">
<!-- CSS -->
<link rel="stylesheet" href="/assets/css/core.css">
<link rel="stylesheet" href="/assets/css/header-sidebar.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Quicksand&display=swap">
<link rel="preconnect" href="https://fonts.gstatic.com">
<style>
.card {
background-color: #27292a;
border: 1px solid #2d2f30;
border-radius: 5px;
padding: 20px;
box-sizing: border-box;
font-size: 16px;
line-height: 25px;
display: inline-block;
margin: 20px;
}
.card p {
margin-top: 0;
}
input {
font-family: inherit;
background-color: #191b1d;
outline: none;
color: #d3d3d3;
border: 1px solid gray;
padding: 3px 5px;
width: 70%;
font-size: 1.1em;
}
button {
font-size: 1.1em;
font-family: inherit;
background-color: #27292a;
outline: none;
color: #d3d3d3;
border: 1px solid rgba(var(--main-color-rgb), 0.4);
padding: 3px 5px;
}
button:hover {
border: 1px solid rgba(var(--main-color-rgb), 0.8);
}
.link {
border: 1px solid gray;
margin: 10px 0 !important;
padding: 0 5px;
font-family: monospace;
word-wrap: break-word;
word-break: break-all;
}
img {
width: 100%;
}
@media screen and (max-width: 750px) {
button {
margin: 10px 0;
}
input {
width: 100%;
}
}
</style>
<!-- JS -->
<script src="/assets/javascript/header-sidebar.js"></script>
<!-- META -->
<meta name="pagename" content="images"> <!-- The name of the page-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Generate dynamic images which show you your TNT Games stats."> <!-- Description -->
<meta name="theme-color" content="#00f0f0">
<meta property="og:url" content="https://www.plotzes.ml/images"> <!-- URL to page -->
<meta property="og:type" content="website">
<meta property="og:title" content="Stat Images"> <!-- Title of the page-->
<meta property="og:site_name" content="Plotzes">
<meta property="og:description" content="Generate dynamic images which show you your TNT Games stats."> <!-- Description -->
<meta property="og:image" content="https://www.plotzes.ml/assets/images/png/images.png"> <!-- Image to use -->
<meta property="og:image:type" content="/assets/image/png">
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="plotzes.ml">
<meta property="twitter:url" content="https://www.plotzes.ml/images"> <!-- URL to page -->
<meta name="twitter:title" content="Stat Images"> <!-- Title of the page -->
<meta name="twitter:description" content="Generate dynamic images which show you your TNT Games stats."> <!-- Description -->
<meta name="twitter:image" content="https://www.plotzes.ml/assets/images/png/images.png"> <!-- Image to use -->
</head>
<body>
<div id="root">
<div class="card" style="max-width: 800px;">
<p>
This is a dynamic image that gets updated when it is loaded.
You can use it in forum signatures or other places.
Due to caching the image can be up to a few hours behind.
Enter a player name or UUID below to see how their image looks.
</p>
<input id="user" type="text" maxlength="36" placeholder="Enter player or UUID...">
<button id="button" onclick="editLinks()">Show picture</button>
</div>
<script>
function editLinks() {
let user = document.getElementById("user").value;
let images = document.getElementsByTagName("img");
for(let i = 0; i < images.length; i++) {
let image = images.item(i);
if(/[^/]+$/g.exec(image.src)[0].toLowerCase() == encodeURIComponent(user).toLowerCase() + ".png") {
return;
}
image.src = image.src.replace(/[^/]+$/g, encodeURIComponent(user) + ".png");
}
let links = document.getElementsByClassName("link");
for(let i = 0; i < images.length; i++) {
let link = links.item(i);
link.innerHTML = link.innerHTML.replace(/[^/]+$/g, encodeURIComponent(user) + ".png");
}
}
</script>
<div class="card">
<h3 style="margin: 0;">Wizards Stats</h3>
<p class="link">https://www.plotzes.ml/img/wizards/Plotzes.png</p>
<img alt="Wizards stats" src="https://www.plotzes.ml/img/wizards/Plotzes.png">
</div>
</div>
</body>
</html>